home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / macros / latex209 / contrib / xymtex / hetaromh.sty < prev    next >
Text File  |  1994-07-10  |  107KB  |  3,235 lines

  1. % hetaromh.sty
  2. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  3. \typeout{XyMTeX for Drawing Chemical Structural Formulas. Version 1.00}
  4. \typeout{       -- Released December 1, 1993 by Shinsaku Fujita}
  5. \typeout{}
  6. \typeout{}
  7. % Copyright (C) 1993 by Shinsaku Fujita, all rights reserved.
  8. %
  9. % This file is a part of the macro package ``XyMTeX'' which has been 
  10. % designed for typesetting chemical structural formulas.
  11. %
  12. % This file is to be contained in the ``xymtex'' directory which is 
  13. % an input directory for TeX. It is a LaTeX optional style file and 
  14. % should be used only within LaTeX, because several macros of the file 
  15. % are based on LaTeX commands. 
  16. %
  17. % For the review of XyMTeX, see
  18. %  (1)  Shinsaku Fujita, ``Typesetting structural formulas with the text
  19. %    formatter TeX/LaTeX'', Computers and Chemistry, in press.    
  20. % The following book deals with an application of TeX/LaTeX to 
  21. % preparation of manuscripts of chemical fields:
  22. %  (2)  Shinsaku Fujita, ``LaTeX for Chemists and Biochemists'' 
  23. %    Tokyo Kagaku Dozin, Tokyo (1993) [in Japanese].  
  24. %
  25. % Copying of this file is authorized only if either
  26. %  (1) you make absolutely no changes to your copy, including name and 
  27. %     directory name; or
  28. %  (2) if you do make changes, 
  29. %     (a) you name it something other than the names included in the 
  30. %         ``xymtex'' directory and 
  31. %     (b) you are requested to leave this notice intact.
  32. % This restriction ensures that all standard styles are identical.
  33. %
  34. % Please report any bugs, comments, suggestions, etc. to:
  35. %   Shinsaku Fujita, 
  36. %   Ashigara Research Laboratories, Fuji Photo Film Co., Ltd., 
  37. %   Minami-Ashigara, Kanagawa-ken, 250-01, Japan.
  38. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  39. \def\j@urnalname{hetaromh}
  40. \def\versi@ndate{December 01, 1993}
  41. \def\versi@nno{ver1.00}
  42. \def\copyrighth@lder{SF} % Shinsaku Fujita
  43. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  44. %\typeout{XyMTeX Macro File `\j@urnalname' (\versi@nno) <\versi@ndate>\space%
  45. % [\copyrighth@lder]}
  46. %
  47. % **********************************
  48. % * hetaromh.sty: list of commands *
  49. % **********************************
  50. %
  51. % <Conventions for bond-setting>
  52. %
  53. %     \hbonda
  54. %     \hbondf
  55. %     \hbondb
  56. %     \hbondc
  57. %     \hbondd
  58. %     \hbonde
  59. %     \hbondvert
  60. %     \hbondverti
  61. %
  62. %     \hskbonda
  63. %     \hskbondf
  64. %     \hskbondc
  65. %     \hskbondd
  66. %     \hskbondb
  67. %     \hskbonde
  68. %     \hskbondvert
  69. %     \hskbondverti
  70. %
  71. %  <Six-membered heterocycles (horizontal)>
  72. %
  73. %    Basic Macros
  74. %
  75. %     \sixheteroh                \@sixheteroh
  76. %     \sixheterohi               \@sixheterohi
  77. %
  78. %    Application Macros
  79. %
  80. %     \pyridineh                 \@pyridineh
  81. %     \pyridinehi                \@pyridinehi
  82. %     \pyrazineh                 \@pyrazineh
  83. %     \pyrimidineh               \@pyrimidineh
  84. %     \pyrimidinehi              \@pyrimidinehi
  85. %     \pyridazineh               \@pyridazineh
  86. %     \pyridazinehi              \@pyridazinehi
  87. %     \triazineh                 \@triazineh
  88. %     \triazinehi                \@triazinehi
  89. %
  90. %  <Five-membered heterocycles (horizontal)>
  91. %
  92. %    Basic Macros
  93. %
  94. %     \fiveheteroh               \@fiveheteroh
  95. %     \fiveheterohi              \@fiveheterohi
  96. %
  97. %    Application Macros
  98. %
  99. %     \pyrroleh                  \@pyrroleh
  100. %     \pyrazoleh                 \@pyrazoleh
  101. %     \imidazoleh                \@imidazoleh
  102. %     \isoxazoleh                \@isoxazoleh
  103. %     \oxazoleh                  \@oxazoleh
  104. %     \pyrrolehi                 \@pyrrolehi
  105. %     \pyrazolehi                \@pyrazolehi
  106. %     \imidazolehi               \@imidazolehi
  107. %     \isoxazolehi               \@isoxazolehi
  108. %     \oxazolehi                 \@oxazolehi
  109. %
  110. %  <Six-Six fused heterocycles (horizontal)>
  111. %
  112. %    Basic Macros
  113. %
  114. %     \decaheteroh               \@decaheteroh
  115. %     \decaheterohi              \@decaheterohi
  116. %
  117. %    Application Macros
  118. %
  119. %     \quinolineh                \@quinolineh
  120. %     \quinolinehi               \@quinolinehi
  121. %     \isoquinolineh             \@isoquinolineh
  122. %     \isoquinolinehi            \@isoquinolinehi
  123. %     \quinoxalineh              \@quinoxalineh
  124. %     \quinazolineh              \@quinazolineh
  125. %     \quinazolinehi             \@quinazolinehi
  126. %     \cinnolineh                \@cinnolineh
  127. %     \cinnolinehi               \@cinnolinehi
  128. %     \pteridineh                \@pteridineh
  129. %     \pteridinehi               \@pteridinehi
  130. %
  131. %  <Six-Five fused heterocycles (horizontal)>
  132. %
  133. %    Basic Macros
  134. %
  135. %     \nonaheteroh               \@nonaheteroh
  136. %     \nonaheterohi              \@nonaheterohi
  137. %
  138. %    Application Macros
  139. %
  140. %     \purineh                   \@purineh
  141. %     \purinehi                  \@purinehi
  142. %     \indoleh                   \@indoleh
  143. %     \indolehi                  \@indolehi
  144. %     \indolizineh               \@indolizineh
  145. %     \indolizinehi              \@indolizinehi
  146. %     \isoindoleh                \@isoindoleh
  147. %     \isoindolehi               \@isoindolehi
  148. %     \benzofuraneh              \@benzofuraneh
  149. %     \benzofuranehi             \@benzofuranehi
  150. %     \isobenzofuraneh           \@isobenzofuraneh
  151. %     \isobenzofuranehi          \@isobenzofuranehi
  152. %     \benzoxazoleh              \@benzoxazoleh
  153. %     \benzoxazolehi             \@benzoxazolehi
  154. %
  155. %   <Building units>
  156. %
  157. %     \sixunith                  \@sixunith
  158. %     \fiveunith                 \@fiveunith
  159. %     \fiveunithi                \@fiveunithi
  160. %
  161. % *************************
  162. % * input of basic macros *
  163. % *************************
  164. \@ifundefined{setsixringv}{\input chemstr.sty\relax}{}%
  165. \unitlength=0.1pt%
  166. %% ****************************
  167. %% * various flags (switches) *
  168. %% ****************************
  169. %\newif\if@gclip \@gclipfalse%
  170. %\newif\if@hclip \@hclipfalse%
  171. %\newif\if@iclip \@iclipfalse%
  172. %\newif\if@jclip \@jclipfalse%
  173. %\def\iniflag{%
  174. %\@aclipfalse \@bclipfalse\@cclipfalse\@clipfalse\@eclipfalse%
  175. %\@fclipfalse\@gclipfalse\@hclipfalse\@iclipfalse\@jclipfalse%
  176. %\@clipfusefalse}%
  177. %\def\iniatom{%
  178. %\def\aaa{}\def\bbb{}\def\ccc{}\def\ddd{}\def\eee{}\def\fff{}%
  179. %\def\ggg{}\def\hhh{}\def\iii{}\def\jjj{}%
  180. %\def\@aaa{}\def\@bbb{}\def\@ccc{}\def\@ddd{}\def\@eee{}\def\@fff{}%
  181. %}%
  182. %\def\resetbdsw{\gdef\@aaa{a}\gdef\@bbb{b}\gdef\@ccc{c}%
  183. %\gdef\@ddd{d}\gdef\@eee{e}\gdef\@fff{f}}%
  184. %
  185. \iniatom%
  186. % ******************************
  187. % * setting inner double bonds *
  188. % ******************************
  189. % These macros are used in \sixhetero and \fivehetero for setting 
  190. % inner double bonds in accordance with the presence or the absence of 
  191. % hetero atoms. The following numbering is adopted in this macro. 
  192. %
  193. %                                   b
  194. %                          (bbb) 2      3  (ccc)
  195. %                            a    -----    c
  196. %                               *       *
  197. %   the original point ===> 1 * (aaa)     * 4  (ddd)
  198. %          (0,0)                *       *  c
  199. %                            f    -----
  200. %                          (fff) 6      5  (eee)
  201. %                                   e
  202. %
  203. % bond between 1 and 2
  204. \def\hbonda{%
  205.   \ifx\aaa\empty%
  206.    \ifx\bbb\empty%
  207.      \put(42,6){\line(3,5){78}}%           %double bond 1-2
  208.    \else%
  209.      \put(42,6){\line(3,5){62}}%           %double bond 1-2
  210.    \fi%
  211.   \else%
  212.    \ifx\bbb\empty%
  213.      \put(57,36){\line(3,5){62}}%          %double bond 1-2
  214.    \else%
  215.      \put(57,36){\line(3,5){62}}%          %double bond 1-2
  216.    \fi\fi}%
  217. % bond between 1 and 6
  218. \def\hbondf{%
  219.   \ifx\aaa\empty%
  220.    \ifx\fff\empty%
  221.     \put(42,-6){\line(3,-5){78}}%          %double bond 1-6
  222.    \else%
  223.      \put(42,-6){\line(3,-5){62}}%         %double bond 1-6
  224.    \fi%
  225.   \else%
  226.    \ifx\fff\empty%
  227.      \put(57,-36){\line(3,-5){62}}%        %double bond 1-6
  228.    \else%
  229.      \put(57,-36){\line(3,-5){62}}%        %double bond 1-6
  230.    \fi\fi}%
  231. % bond between 3 and 2
  232.  \def\hbondb{%
  233.   \ifx\bbb\empty%
  234.    \ifx\ccc\empty%
  235.     \put(129,138){\line(1,0){148}}%        %double bond 2-3
  236.    \else%
  237.     \put(129,138){\line(1,0){134}}%        %double bond 3-2
  238.    \fi%
  239.   \else%
  240.    \ifx\ccc\empty%
  241.     \put(143,138){\line(1,0){134}}%        %double bond 3-2
  242.    \else%
  243.     \put(143,138){\line(1,0){110}}%        %double bond 3-2
  244.    \fi\fi}%
  245. % bond between 4 and 3
  246.  \def\hbondc{%
  247.   \ifx\ddd\empty%
  248.    \ifx\ccc\empty%
  249.     \put(364,6){\line(-3,5){78}}%          %double bond 4-3
  250.    \else%
  251.     \put(364,6){\line(-3,5){62}}%          %double bond 4-3
  252.    \fi%
  253.   \else%
  254.    \ifx\ccc\empty%
  255.     \put(349,36){\line(-3,5){62}}%         %double bond 4-3
  256.    \else%
  257.     \put(349,36){\line(-3,5){62}}%         %double bond 4-3
  258.    \fi\fi}%
  259. % bond between 4 and 5
  260.  \def\hbondd{%
  261.   \ifx\ddd\empty%
  262.    \ifx\eee\empty%
  263.     \put(364,-6){\line(-3,-5){78}}%        %double bond 4-5
  264.    \else%
  265.     \put(364,-6){\line(-3,-5){62}}%        %double bond 4-5
  266.    \fi%
  267.   \else%
  268.    \ifx\eee\empty%
  269.     \put(349,-36){\line(-3,-5){62}}%       %double bond 4-5
  270.    \else%
  271.     \put(349,-36){\line(-3,-5){62}}%       %double bond 4-5
  272.    \fi\fi}%
  273. % bond between 5 and 6
  274. \def\hbonde{%
  275.   \ifx\fff\empty%
  276.    \ifx\eee\empty%
  277.     \put(129,-138){\line(1,0){148}}%       %double bond 6-5
  278.    \else%
  279.     \put(129,-138){\line(1,0){134}}%       %double bond 5-6
  280.    \fi%
  281.   \else%
  282.    \ifx\eee\empty%
  283.     \put(143,-138){\line(1,0){134}}%       %double bond 5-6
  284.    \else%
  285.     \put(143,-138){\line(1,0){110}}%       %double bond 5-6
  286.    \fi\fi}%
  287. % vertical inner bond for five-membered rings
  288. \def\hbondvert{%
  289.   \ifx\fff\empty%
  290.     \ifx\bbb\empty%
  291.      \put(136,-138){\line(0,1){277}}%      %double bond 4-3
  292.     \else%
  293.      \put(136,-138){\line(0,1){258}}%      %double bond 4-3
  294.     \fi%
  295.   \else%
  296.     \ifx\bbb\empty%
  297.      \put(136,-120){\line(0,1){258}}%      %double bond 4-3
  298.     \else
  299.      \put(136,-120){\line(0,1){239}}%      %double bond 4-3
  300.     \fi\fi}%
  301. % horizontal inner bond for five-membered rings (inverse type) 
  302. \def\hbondverti{%
  303.   \ifx\eee\empty%
  304.     \ifx\ccc\empty%
  305.      \put(270,-138){\line(0,0){277}}%      %double bond 4-3
  306.     \else%
  307.      \put(270,-138){\line(0,1){258}}%      %double bond 4-3
  308.     \fi%
  309.   \else%
  310.     \ifx\ccc\empty%
  311.      \put(270,-120){\line(0,1){258}}%      %double bond 4-3
  312.     \else%
  313.      \put(270,-120){\line(0,1){239}}%      %double bond 4-3
  314.     \fi\fi}%
  315. % ********************************************
  316. % * setting skeletal bonds (horizontal type) *
  317. % ********************************************
  318. % These macros are used in \sixheteroh and \fiveheteroh for setting 
  319. % skeletal bonds in accordance with the presence or the absence of 
  320. % hetero atoms. The following numbering is adopted in this macro. 
  321. %
  322. %                                   b
  323. %                          (bbb) 2      3  (ccc)
  324. %                            a    -----    c
  325. %                               *       *
  326. %   the original point ===> 1 * (aaa)     * 4  (ddd)
  327. %          (0,0)                *       *  d
  328. %                            f    -----
  329. %                          (fff) 6      5  (eee)
  330. %                                   e
  331. %bond between 1 and 2
  332. \def\hskbonda{%
  333.   \ifx\aaa\empty%
  334.     \ifx\bbb\empty%
  335.      \put(0,0){\line(3,5){103}}%           %bond 1-2
  336.     \else%
  337.      \put(0,0){\line(3,5){79}}%            %bond 1-2
  338.     \fi%
  339.    \else%
  340.     \ifx\bbb\empty%
  341.      \put(24,40){\line(3,5){79}}%          %bond 1-2
  342.     \else%
  343.      \put(24,40){\line(3,5){62}}%          %bond 1-2
  344.     \fi\fi}%
  345. %bond between 1 and 6
  346. \def\hskbondf{%
  347.   \ifx\aaa\empty%
  348.     \ifx\fff\empty
  349.      \put(0,0){\line(3,-5){103}}%          %bond 1-6
  350.     \else%
  351.      \put(0,0){\line(3,-5){79}}%           %bond 1-6
  352.     \fi%
  353.    \else%
  354.     \ifx\fff\empty%
  355.      \put(24,-40){\line(3,-5){79}}%        %bond 1-6
  356.     \else%
  357.      \put(24,-40){\line(3,-5){62}}%        %bond 1-6
  358.     \fi\fi}%
  359. %bond between 4 and 3
  360. \def\hskbondc{%
  361.   \ifx\ddd\empty%
  362.     \ifx\ccc\empty%
  363.     \put(406,0){\line(-3,5){103}}%         %bond 4-3
  364.     \else%
  365.      \put(406,0){\line(-3,5){79}}%         %bond 4-3
  366.     \fi%
  367.   \else%
  368.     \ifx\ccc\empty%
  369.      \put(382,40){\line(-3,5){79}}%        %bond 4-3
  370.     \else%
  371.      \put(382,40){\line(-3,5){62}}%        %bond 4-3
  372.     \fi\fi}%
  373. %bond between 4 and 5
  374. \def\hskbondd{%
  375.   \ifx\ddd\empty%
  376.     \ifx\eee\empty%
  377.      \put(406,0){\line(-3,-5){103}}%       %bond 4-5
  378.     \else%
  379.      \put(406,0){\line(-3,-5){79}}%        %bond 4-5
  380.     \fi%
  381.   \else%
  382.     \ifx\eee\empty%
  383.      \put(382,-40){\line(-3,-5){79}}%      %bond 4-5
  384.     \else%
  385.      \put(382,-40){\line(-3,-5){62}}%      %bond 4-5
  386.     \fi\fi}%
  387. %bond between 3 and 2
  388. \def\hskbondb{%
  389.   \ifx\bbb\empty%
  390.     \ifx\ccc\empty%
  391.      \put(103,171){\line(1,0){200}}%       %bond 2-3
  392.     \else%
  393.      \put(103,171){\line(1,0){160}}%       %bond 3-2
  394.     \fi%
  395.   \else%
  396.     \ifx\ccc\empty%
  397.      \put(143,171){\line(1,0){160}}%       %bond 3-2
  398.     \else%
  399.      \put(143,171){\line(1,0){120}}%       %bond 3-2
  400.     \fi\fi}%
  401. %bond between 5 and 6
  402. \def\hskbonde{%
  403.   \ifx\eee\empty%
  404.     \ifx\fff\empty%
  405.      \put(103,-171){\line(1,0){200}}%      %bond 6-5
  406.     \else%
  407.      \put(143,-171){\line(1,0){160}}%      %bond 5-6
  408.     \fi%
  409.   \else%
  410.     \ifx\fff\empty%
  411.      \put(103,-171){\line(1,0){160}}%      %bond 5-6
  412.     \else%
  413.      \put(143,-171){\line(1,0){120}}%      %bond 5-6
  414.     \fi\fi}%
  415. %vertical bond for five-membered rings
  416. \def\hskbondvert{%
  417.   \ifx\fff\empty%
  418.     \ifx\bbb\empty%
  419.      \put(103,-171){\line(0,1){342}}%      %bond 4-3
  420.     \else%
  421.      \put(103,-171){\line(0,1){300}}%      %bond 4-3
  422.     \fi%
  423.   \else%
  424.     \ifx\bbb\empty%
  425.      \put(103,171){\line(0,-1){300}}%      %bond 4-3
  426.     \else%
  427.      \put(103,-129){\line(0,1){258}}%      %bond 4-3
  428.     \fi\fi}%
  429. %vertical bond for five-membered rings (inverse type)
  430. \def\hskbondverti{%
  431.   \ifx\eee\empty%
  432.     \ifx\ccc\empty%
  433.      \put(303,-171){\line(0,1){342}}%      %bond 4-3
  434.     \else%
  435.      \put(303,-171){\line(0,1){300}}%      %bond 4-3
  436.     \fi%
  437.   \else%
  438.     \ifx\ccc\empty%
  439.      \put(303,171){\line(0,-1){300}}%      %bond 4-3
  440.     \else%
  441.      \put(303,-129){\line(0,1){258}}%      %bond 4-3
  442.     \fi\fi}%
  443. %
  444. % *************************
  445. % * sixhetero derivatives *
  446. % *  (horizontal type)    *
  447. % *************************
  448. % The following numbering is adopted in this macro. 
  449. %
  450. %                                   b
  451. %                                2      3  
  452. %                            a    -----    c
  453. %                               *       *
  454. %   the original point ===> 1 *           * 4
  455. %          (0,0)                *       *  d
  456. %                            f    -----
  457. %                                6      5 
  458. %                                   e
  459. %
  460. %   \sixheteroh[BONDLIST]{ATOMLIST}{SUBSLIST}
  461. %  
  462. %     BONDLIST = 
  463. %
  464. %           none or r  :  sixhetero (right-handed)
  465. %           l          :  sixhetero (left-handed)
  466. %           a          :  1,2-double bond
  467. %           b          :  2,3-double bond
  468. %           c          :  4,3-double bond
  469. %           d          :  4,5-double bond
  470. %           e          :  5,6-double bond
  471. %           f          :  6,1-double bond
  472. %           A          :  aromatic circle 
  473. %           {n+}       :  plus at the n-nitrogen atom (n = 1 to 4)
  474. %
  475. %     ATOMLIST: list of heteroatoms (max 6 atoms)
  476. %
  477. %       for n = 1 to 6
  478. %
  479. %           n          : Hetero atom, e.g. N, O, etc. at n-position, 
  480. %                        e.g. 1==N for N at 1-position
  481. %
  482. %     SUBSLIST: list of substituents (max 6 substitution positions)
  483. %
  484. %       for n = 1 to 6 
  485. %
  486. %           nD         :  exocyclic double bond at n-atom
  487. %           n or nS    :  exocyclic single bond at n-atom
  488. %           nA         :  alpha single bond at n-atom
  489. %           nB         :  beta single bond at n-atom
  490. %           nSA        :  alpha single bond at n-atom (boldface)
  491. %           nSB        :  beta single bond at n-atom (dotted line)
  492. %           nSa        :  alpha (not specified) single bond at n-atom
  493. %           nSb        :  beta (not specified) single bond at n-atom
  494. %
  495. %       e.g. 
  496. %        
  497. %        \sixheteroh{1==N}{1==Cl;2==F}
  498. %        \sixheteroh[c]{1==N}{1==Cl;4==F;2==CH$_{3}$}
  499. %        \sixheteroh[eb]{1==N}{1D==O;4SA==MeO;4SB==OMe;5==Cl;6==Cl}
  500. %
  501. \def\sixheteroh{\@ifnextchar[{\@sixheteroh}{\@sixheteroh[r]}}
  502. \def\@sixheteroh[#1]#2#3{%
  503. %%%%%%%%%%%%%%%%%%%%%%%%%%
  504. % treatment of atom list %
  505. %%%%%%%%%%%%%%%%%%%%%%%%%%
  506. \iniatom\iniflag%initialize
  507. \@forsemicol\member:=#2\do{%
  508. \expandafter\@m@mb@r\member;\relax%
  509. \expandafter\twoch@r\@membera{}%
  510. \ifcase\@tmpa%
  511.  \or \xdef\aaa{\@memberb}%
  512.  \or \xdef\bbb{\@memberb}%
  513.  \or \xdef\ccc{\@memberb}%
  514.  \or \xdef\ddd{\@memberb}%
  515.  \or \xdef\eee{\@memberb}%
  516.  \or \xdef\fff{\@memberb}%
  517. \fi}%
  518. \begin{picture}(880,800)(-240,-400)%
  519.   \iforigpt \put(-\shifti,-\shiftii){\circle*{50}}%
  520.            \put(-\noshift,-\noshift){\circle{50}}% 
  521.    \typeout{command `sixheteroh' origin: %
  522.     (\the\noshift,\the\noshift) ---> (\the\shifti,\the\shiftii)}\fi%
  523. %%%%%%%%%%%%%%%%%%
  524. % outer skeleton %
  525. %%%%%%%%%%%%%%%%%%
  526.  \hskbonda% bond between 1 and 2
  527.  \hskbondf% bond between 1 and 6
  528.  \hskbondc% bond between 4 and 3
  529.  \hskbondd% bond between 4 and 5
  530.  \hskbondb% bond between 3 and 2
  531.  \hskbonde% bond between 5 and 6
  532. %%%%%%%%%%%%%%%%%%%%%
  533. % inner double bond %
  534. %%%%%%%%%%%%%%%%%%%%%
  535. \@tfor\member:=#1\do{%
  536. \if\member r\relax \hbondd \hbondf \hbondb%
  537. \else \if\member l\relax \hbonda \hbondc \hbonde%
  538. \else \if\member a\relax \hbonda%
  539. \else \if\member b\relax \hbondb%
  540. \else \if\member c\relax \hbondc%
  541. \else \if\member d\relax \hbondd%
  542. \else \if\member e\relax \hbonde%
  543. \else \if\member f\relax \hbondf%
  544. \else \if\member A%left aromatic circle 
  545.   \put(0,203){\circle{240}}%                %circle
  546. \else \expandafter\twoch@@r\member{}{}%
  547.       \if\@@tmpa 4\relax%
  548.         \putratom{272}{-18}{\@@tmpb}%      % right type
  549.       \else\if\@@tmpa 1\relax%
  550.         \putratom{68}{-18}{\@@tmpb}%       % right type
  551.       \else\if\@@tmpa 3\relax%
  552.         \putratom{233}{60}{\@@tmpb}%       % right type
  553.       \else\if\@@tmpa 2\relax%
  554.         \putratom{120}{60}{\@@tmpb}%       % right type
  555.       \else\if\@@tmpa 5\relax%
  556.         \putratom{233}{-110}{\@@tmpb}%     % right type
  557.       \else\if\@@tmpa 6\relax%
  558.         \putratom{120}{-110}{\@@tmpb}%     % right type
  559.       \fi\fi\fi\fi\fi\fi%
  560. \fi\fi\fi\fi\fi\fi\fi\fi\fi}%
  561. %%%%%%%%%%%%%%%%%%%%%%%%
  562. % setting hetero atoms %
  563. %%%%%%%%%%%%%%%%%%%%%%%%
  564. \ifx\ddd\empty\else%
  565.    \@cliptrue%
  566.    \putratom{346}{-36}{\ddd}%              % right type
  567. \fi%
  568. \ifx\aaa\empty\else%
  569.      \@acliptrue%
  570.      \putlatom{60}{-36}{\aaa}%             % left type
  571. \fi%
  572. \ifx\bbb\empty\else%
  573.      \@bcliptrue%
  574.      \putlatom{135}{141}{\bbb}%            % left type
  575. \fi%
  576. \ifx\ccc\empty\else%
  577.      \@ccliptrue%
  578.      \putratom{273}{141}{\ccc}%            % right type
  579. \fi%
  580. \ifx\fff\empty\else%
  581.      \@fcliptrue%
  582.      \putlatom{135}{-211}{\fff}%           % left type
  583. \fi%
  584. \ifx\eee\empty\else%
  585.      \@ecliptrue%
  586.      \putratom{273}{-211}{\eee}%           % right type
  587. \fi%
  588. \setsixringh{#3}{0}{0}{7}{0}%              %subst 1--6
  589. \end{picture}\iniatom\iniflag}%     %end of \sixheteroh macro
  590. %
  591. % ************************************
  592. % * sixhetero derivatives            *
  593. % *  (horizontal type, inverse type) *
  594. % ************************************
  595. % The following numbering is adopted in this macro. 
  596. %
  597. %                                   b
  598. %                                3      2  
  599. %                            c    -----    a
  600. %                               *       *
  601. %   the original point ===> 4 *           * 1
  602. %          (0,0)                *       *  f
  603. %                            d    -----
  604. %                                5      6 
  605. %                                   e
  606. %
  607. %   \sixheterohi[BONDLIST]{ATOMLIST}{SUBSLIST}
  608. %  
  609. %     BONDLIST = 
  610. %
  611. %           none or r  :  sixhetero (right-handed)
  612. %           l          :  sixhetero (left-handed)
  613. %           [] or H    :  fully saturated form
  614. %           a          :  1,2-double bond
  615. %           b          :  2,3-double bond
  616. %           c          :  4,3-double bond
  617. %           d          :  4,5-double bond
  618. %           e          :  5,6-double bond
  619. %           f          :  6,1-double bond
  620. %           A          :  aromatic circle 
  621. %           {n+}       :  plus at the n-nitrogen atom (n = 1 to 4)
  622. %
  623. %     ATOMLIST: list of heteroatoms (max 6 atoms)
  624. %
  625. %       for n = 1 to 6
  626. %
  627. %           n          : Hetero atom, e.g. N, O, etc. at n-position, 
  628. %                        e.g. 1==N for N at 1-position
  629. %
  630. %     SUBSLIST: list of substituents (max 6 substitution positions)
  631. %
  632. %       for n = 1 to 6 
  633. %
  634. %           nD         :  exocyclic double bond at n-atom
  635. %           n or nS    :  exocyclic single bond at n-atom
  636. %           nA         :  alpha single bond at n-atom
  637. %           nB         :  beta single bond at n-atom
  638. %           nSA        :  alpha single bond at n-atom (boldface)
  639. %           nSB        :  beta single bond at n-atom (dotted line)
  640. %           nSa        :  alpha (not specified) single bond at n-atom
  641. %           nSb        :  beta (not specified) single bond at n-atom
  642. %
  643. %       e.g. 
  644. %        
  645. %        \sixheterohi{1==N}{1==Cl;2==F}
  646. %        \sixheterohi[c]{1==N}{1==Cl;4==F;2==CH$_{3}$}
  647. %        \sixheterohi[eb]{1==N}{1D==O;4SA==MeO;4SB==OMe;5==Cl;6==Cl}
  648. %
  649. \def\sixheterohi{\@ifnextchar[{\@sixheterohi}{\@sixheterohi[r]}}
  650. \def\@sixheterohi[#1]#2#3{%
  651. %%%%%%%%%%%%%%%%%%%%%%%%%%
  652. % treatment of atom list %
  653. %%%%%%%%%%%%%%%%%%%%%%%%%%
  654. \iniatom\iniflag%initialize
  655. \@forsemicol\member:=#2\do{%
  656. \expandafter\@m@mb@r\member;\relax%
  657. \expandafter\twoch@r\@membera{}%
  658. \ifcase\@tmpa%
  659.  \or \xdef\ddd{\@memberb}%
  660.  \or \xdef\ccc{\@memberb}%
  661.  \or \xdef\bbb{\@memberb}%
  662.  \or \xdef\aaa{\@memberb}%
  663.  \or \xdef\fff{\@memberb}%
  664.  \or \xdef\eee{\@memberb}%
  665. \fi}%
  666.  \begin{picture}(880,800)(-240,-400)%
  667.   \iforigpt \put(-\shifti,-\shiftii){\circle*{50}}%
  668.            \put(-\noshift,-\noshift){\circle{50}}% 
  669.    \typeout{command `sixheterohi' origin: %
  670.     (\the\noshift,\the\noshift) ---> (\the\shifti,\the\shiftii)}\fi%
  671. %%%%%%%%%%%%%%%%%%
  672. % outer skeleton %
  673. %%%%%%%%%%%%%%%%%%
  674.  \hskbonda% bond between 4 and 3
  675.  \hskbondf% bond between 4 and 5
  676.  \hskbondc% bond between 1 and 2
  677.  \hskbondd% bond between 1 and 6
  678.  \hskbondb% bond between 3 and 2
  679.  \hskbonde% bond between 5 and 6
  680. %%%%%%%%%%%%%%%%%%%%%
  681. % inner double bond %
  682. %%%%%%%%%%%%%%%%%%%%%
  683. \@tfor\member:=#1\do{%
  684. \if\member r\relax \hbondd \hbondf \hbondb%
  685. \else \if\member l\relax \hbonda \hbondc \hbonde%
  686. \else \if\member a\relax \hbondc%
  687. \else \if\member b\relax \hbondb%
  688. \else \if\member c\relax \hbonda%
  689. \else \if\member d\relax \hbondf%
  690. \else \if\member e\relax \hbonde%
  691. \else \if\member f\relax \hbondd%
  692. \else \if\member A%left aromatic circle 
  693.   \put(0,203){\circle{240}}%               %circle
  694. \else \expandafter\twoch@@r\member{}{}%
  695.       \if\@@tmpa 1\relax%
  696.         \putratom{272}{-18}{\@@tmpb}%      % right type
  697.       \else\if\@@tmpa 4\relax%
  698.         \putratom{68}{-18}{\@@tmpb}%       % right type
  699.       \else\if\@@tmpa 2\relax%
  700.         \putratom{233}{60}{\@@tmpb}%       % right type
  701.       \else\if\@@tmpa 3\relax%
  702.         \putratom{120}{60}{\@@tmpb}%       % right type
  703.       \else\if\@@tmpa 6\relax%
  704.         \putratom{233}{-110}{\@@tmpb}%      % right type
  705.       \else\if\@@tmpa 5\relax%
  706.         \putratom{120}{-110}{\@@tmpb}%      % right type
  707.       \fi\fi\fi\fi\fi\fi%
  708. \fi\fi\fi\fi\fi\fi\fi\fi\fi}%
  709. %%%%%%%%%%%%%%%%%%%%%%%%
  710. % setting hetero atoms %
  711. %%%%%%%%%%%%%%%%%%%%%%%%
  712. \ifx\ddd\empty\else%
  713.    \@cliptrue%
  714.    \putratom{346}{-36}{\ddd}%                % right type
  715. \fi%
  716. \ifx\aaa\empty\else%
  717.      \@acliptrue%
  718.      \putlatom{60}{-36}{\aaa}%               % left type
  719. \fi%
  720. \ifx\bbb\empty\else%
  721.      \@bcliptrue%
  722.      \putlatom{135}{141}{\bbb}%              % left type
  723. \fi%
  724. \ifx\ccc\empty\else%
  725.      \@ccliptrue%
  726.      \putratom{273}{141}{\ccc}%              % right type
  727. \fi%
  728. \ifx\fff\empty\else%
  729.      \@fcliptrue%
  730.      \putlatom{135}{-211}{\fff}%             % left type
  731. \fi%
  732. \ifx\eee\empty\else%
  733.      \@ecliptrue%
  734.      \putratom{273}{-211}{\eee}%             % right type
  735. \fi%
  736. \setsixringh{#3}{5}{0}{5}{-1}%               %subst 1--4
  737. \setsixringh{#3}{11}{4}{7}{-1}%              %subst 5 and 6
  738. \end{picture}\iniatom\iniflag}%     %end of \sixheterohi macro
  739. %
  740. % ************************
  741. % * pyridine derivatives *
  742. % *  (horizontal type)   *
  743. % ************************
  744. %
  745. %   \pyridineh[BONDLIST]{SUBSLIST}
  746. %   \pyridinehi[BONDLIST]{SUBSLIST}
  747. %   \pyrazineh[BONDLIST]{SUBSLIST}
  748. %   \pyrimidineh[BONDLIST]{SUBSLIST}
  749. %   \pyrimidinehi[BONDLIST]{SUBSLIST}
  750. %   \triazineh[BONDLIST]{SUBSLIST}
  751. %   \triazinehi[BONDLIST]{SUBSLIST}
  752. %
  753. %     BONDLIST = 
  754. %
  755. %           none or r  :  pyridine (right-handed)
  756. %           l          :  pyridine (left-handed)
  757. %           H or []    :  fully saturated ring
  758. %           a          :  1,2-double bond
  759. %           b          :  2,3-double bond
  760. %           c          :  4,3-double bond
  761. %           d          :  4,5-double bond
  762. %           e          :  5,6-double bond
  763. %           f          :  6,1-double bond
  764. %           A          :  aromatic circle 
  765. %           *          :  plus at the nitrogen atom
  766. %
  767. %     SUBSLIST: list of substituents (max 6 substitution positions)
  768. %
  769. %       for n = 1 to 6 
  770. %
  771. %           nD         :  exocyclic double bond at n-atom
  772. %           n or nS    :  exocyclic single bond at n-atom
  773. %           nA         :  alpha single bond at n-atom
  774. %           nB         :  beta single bond at n-atom
  775. %           nSA        :  alpha single bond at n-atom (boldface)
  776. %           nSB        :  beta single bond at n-atom (dotted line)
  777. %           nSa        :  alpha (not specified) single bond at n-atom
  778. %           nSb        :  beta (not specified) single bond at n-atom
  779. %
  780. %       e.g. 
  781. %        
  782. %        \pyridineh{1==Cl;2==F}
  783. %        \pyridineh[c]{1==Cl;4==F;2==CH$_{3}$}
  784. %        \pyridineh[eb]{1D==O;4SA==MeO;4SB==OMe;5W==Cl;6==Cl}
  785. %
  786. \def\pyridineh{\@ifnextchar[{\@pyridineh}{\@pyridineh[r]}}%
  787. \def\@pyridineh[#1]#2{%
  788. \iforigpt \typeout{command `pyridineh' is based on `sixheteroh'.}\fi%
  789. \sixheteroh[#1]{1==N}{#2}}%end of \pyridineh macro
  790. \def\pyridinehi{\@ifnextchar[{\@pyridinehi}{\@pyridinehi[r]}}%
  791. \def\@pyridinehi[#1]#2{%
  792. \iforigpt \typeout{command `pyridinehi' is based on `sixheterohi'.}\fi%
  793. \sixheterohi[#1]{1==N}{#2}}% %end of \pyridinehi macro
  794. %
  795. \def\pyrazineh{\@ifnextchar[{\@pyrazineh}{\@pyrazineh[r]}}%
  796. \def\@pyrazineh[#1]#2{%
  797. \iforigpt \typeout{command `pyrazineh' is based on `sixheteroh'.}\fi%
  798. \sixheteroh[#1]{1==N;4==N}{#2}}%end of \pyrazineh macro
  799. %
  800. \def\pyrimidineh{\@ifnextchar[{\@pyrimidineh}{\@pyrimidineh[r]}}%
  801. \def\@pyrimidineh[#1]#2{%
  802. \iforigpt \typeout{command `pyrimidineh' is based on `sixheteroh'.}\fi%
  803. \sixheteroh[#1]{1==N;3==N}{#2}}%
  804.    %end of \pyrimidineh macro
  805. \def\pyrimidinehi{\@ifnextchar[{\@pyrimidinehi}{\@pyrimidinehi[r]}}%
  806. \def\@pyrimidinehi[#1]#2{%
  807. \iforigpt \typeout{command `pyrimidinehi' is based on `sixheterohi'.}\fi%
  808. \sixheterohi[#1]{1==N;3==N}{#2}}%
  809.    %end of \pyrimidinehi macro
  810. %
  811. \def\pyridazineh{\@ifnextchar[{\@pyridazineh}{\@pyridazineh[r]}}%
  812. \def\@pyridazineh[#1]#2{%
  813. \iforigpt \typeout{command `pyridazineh' is based on `sixheteroh'.}\fi%
  814. \sixheteroh[#1]{1==N;2==N}{#2}}%
  815.    %end of \pyridazineh macro
  816. \def\pyridazinehi{\@ifnextchar[{\@pyridazinehi}{\@pyridazinehi[r]}}%
  817. \def\@pyridazinehi[#1]#2{%
  818. \iforigpt \typeout{command `pyridazinehi' is based on `sixheterohi'.}\fi%
  819. \sixheterohi[#1]{1==N;2==N}{#2}}%
  820.    %end of \pyridazinehi macro
  821. %
  822. \def\triazineh{\@ifnextchar[{\@triazineh}{\@triazineh[r]}}%
  823. \def\@triazineh[#1]#2{%
  824. \iforigpt \typeout{command `triazineh' is based on `sixheteroh'.}\fi%
  825. \sixheteroh[#1]{1==N;3==N;5==N}{#2}}%
  826.    %end of \triazineh macro
  827. %
  828. \def\triazinehi{\@ifnextchar[{\@triazinehi}{\@triazinehi[r]}}%
  829. \def\@triazinehi[#1]#2{%
  830. \iforigpt \typeout{command `triazinehi' is based on `sixheterohi'.}\fi%
  831. \sixheterohi[#1]{1==N;3==N;5==N}{#2}}%
  832.    %end of \triazinehi macro
  833. %
  834. % ****************************
  835. % * fivehetero derivatives   *
  836. % *  (horizontal type)       *
  837. % ****************************
  838. % The following numbering is adopted in this macro. 
  839. %
  840. %     3  _____  2
  841. %       |       *
  842. %       |         * 1 <===== the original point
  843. %       |       *
  844. %     4  -----  5
  845. %
  846. %   \fiveheteroh[BONDLIST]{ATOMLIST}{SUBSLIST}
  847. %  
  848. %     BONDLIST: list of inner double bonds 
  849. %
  850. %           a          :  1,2-double bond
  851. %           b          :  2,3-double bond
  852. %           c          :  4,3-double bond
  853. %           d          :  4,5-double bond
  854. %           e          :  5,1-double bond
  855. %           A          :  aromatic circle
  856. %           {n+}       :  plus at the n-nitrogen atom (n = 1 to 4)
  857. %           {0+}       :  plus (or others) at the center
  858. %
  859. %     ATOMLIST: list of heteroatoms (max 5 atoms)
  860. %
  861. %       for n = 1 to 5
  862. %
  863. %           n          : Hetero atom, e.g. N, O, etc. at n-position
  864. %                        e.g. 1==N for N at 1-position
  865. %
  866. %     SUBSLIST: list of substituents (max 5 substitution positions)
  867. %
  868. %       for n = 1 to 5 
  869. %
  870. %           nD         :  exocyclic double bond at n-atom
  871. %           n or nS    :  exocyclic single bond at n-atom
  872. %           nA         :  alpha single bond at n-atom
  873. %           nB         :  beta single bond at n-atom
  874. %           nSA        :  alpha single bond at n-atom (boldface)
  875. %           nSB        :  beta single bond at n-atom (dotted line)
  876. %           nSa        :  alpha (not specified) single bond at n-atom
  877. %           nSb        :  beta (not specified) single bond at n-atom
  878. %
  879. %       e.g. 
  880. %        
  881. %        \fiveheteroh{1==N}{1==H;2==F}
  882. %        \fiveheteroh[c]{1==N}{1==Cl;4==F;2==CH$_{3}$}
  883. %        \fiveheteroh[eb]{1==N}{1D==O;4SA==MeO;4SB==OMe;5W==Cl;6==Cl}
  884. %
  885. \def\fiveheteroh{\@ifnextchar[{\@fiveheteroh}{\@fiveheteroh[r]}}%
  886. \def\@fiveheteroh[#1]#2#3{%
  887. \iniatom\iniflag%initialize
  888. %\def\aaa{}\def\bbb{}\def\ccc{}\def\ddd{}\def\eee{}\def\fff{}%
  889. \@forsemicol\member:=#2\do{%
  890. \expandafter\@m@mb@r\member;\relax%
  891. \expandafter\twoch@r\@membera{}%
  892. \ifcase\@tmpa%
  893.  \or \xdef\ddd{\@memberb}%
  894.  \or \xdef\ccc{\@memberb}%
  895.  \or \xdef\bbb{\@memberb}%
  896.  \or \xdef\fff{\@memberb}%
  897.  \or \xdef\eee{\@memberb}%
  898. \fi}%
  899. \begin{picture}(800,880)(-240,-400)%
  900.   \iforigpt \put(-\shifti,-\shiftii){\circle*{50}}%
  901.            \put(-\noshift,-\noshift){\circle{50}}% 
  902.    \typeout{command `fiveheteroh' origin: %
  903.     (\the\noshift,\the\noshift) ---> (\the\shifti,\the\shiftii)}\fi%
  904. %%%%%%%%%%%%%%%%%%
  905. % outer skeleton %
  906. %%%%%%%%%%%%%%%%%%
  907. \hskbondc%bond between 1 and 2
  908. \hskbondd%bond between 1 and 5
  909. \hskbondb%bond between 2 to 3
  910. \hskbonde%bond between 5 and 4
  911. \hskbondvert%bond between 4 and 3
  912. %%%%%%%%%%%%%%%%%%%%%
  913. % inner double bond %
  914. %%%%%%%%%%%%%%%%%%%%%
  915. \@tfor\member:=#1\do{%
  916. \if\member r%
  917. \else \if\member a\relax \hbondc%
  918. \else \if\member b\relax \hbondb%
  919. \else \if\member c\relax \hbondvert%
  920. \else \if\member d\relax \hbonde%
  921. \else \if\member e\relax \hbondd%
  922. \else \if\member A%left aromatic circle 
  923.   \put(233,0){\circle{180}}%               %circle
  924. \else \expandafter\twoch@@r\member{}{}%
  925.       \if\@@tmpa 1\relax%
  926.         \putratom{272}{-18}{\@@tmpb}%      % right type
  927.       \else\if\@@tmpa 2\relax%
  928.         \putratom{233}{60}{\@@tmpb}%       % right type
  929.       \else\if\@@tmpa 3\relax%
  930.         \putratom{120}{60}{\@@tmpb}%       % right type
  931.       \else\if\@@tmpa 5\relax%
  932.         \putratom{233}{-110}{\@@tmpb}%     % right type
  933.       \else\if\@@tmpa 4\relax%
  934.         \putratom{120}{-110}{\@@tmpb}%     % right type
  935.       \else\if\@@tmpa 0\relax%
  936.         \putratom{196}{-30}{\@@tmpb}%      % right type
  937.       \fi\fi\fi\fi\fi\fi%
  938. \fi\fi\fi\fi\fi\fi\fi}%
  939. %%%%%%%%%%%%%%%%%%%%%%%%
  940. % setting hetero atoms %
  941. %%%%%%%%%%%%%%%%%%%%%%%%
  942. \ifx\ddd\empty\else%
  943.    \@cliptrue%
  944.    \putratom{356}{-36}{\ddd}%              % right type
  945. %   \putratom{346}{-36}{\ddd}%              % right type
  946. \fi%
  947. %\ifx\aaa\empty\else
  948. %     \@acliptrue
  949. %     \putlatom{60}{-36}{\aaa}  % left type
  950. %\fi
  951. \ifx\bbb\empty\else%
  952.      \@bcliptrue%
  953.      \putlatom{135}{141}{\bbb}%             % left type
  954. \fi%
  955. \ifx\ccc\empty\else%
  956.      \@ccliptrue%
  957.      \putratom{273}{141}{\ccc}%             % right type
  958. \fi%
  959. \ifx\fff\empty\else%
  960.      \@fcliptrue%
  961.      \putlatom{135}{-211}{\fff}%            % left type
  962. \fi%
  963. \ifx\eee\empty\else%
  964.      \@ecliptrue%
  965.      \putratom{273}{-211}{\eee}%            % right type
  966. \fi
  967. %%%%%%%%%%%%%%%%%%%%%%%%
  968. % setting substituents %
  969. %%%%%%%%%%%%%%%%%%%%%%%%
  970. \put(0,0){\setsixringh{#3}{5}{1}{5}{-1}}%   % for 1 to 3
  971. \put(0,0){\setsixringh{#3}{10}{4}{7}{-1}}%  % for 4 to 5
  972. \end{picture}\iniatom\iniflag}%      %end of \fiveheteroh macro
  973. %
  974. % *******************************
  975. % * fivehetero derivatives      *
  976. % *  (horizontal type, inverse) *
  977. % *******************************
  978. % The following numbering is adopted in this macro. 
  979. %
  980. %                       2  -----  3
  981. %                        *       |
  982. % the original point 1 *         |
  983. %                        *       |
  984. %                           _____|
  985. %                        5        4
  986. %
  987. %   \fiveheterohi[BONDLIST]{ATOMLIST}{SUBSLIST}
  988. %  
  989. %     BONDLIST: list of inner double bonds 
  990. %
  991. %           a          :  1,2-double bond
  992. %           b          :  2,3-double bond
  993. %           c          :  4,3-double bond
  994. %           d          :  4,5-double bond
  995. %           e          :  5,1-double bond
  996. %           A          :  aromatic circle
  997. %           {n+}       :  plus at the n-nitrogen atom (n = 1 to 4)
  998. %           {0+}       :  plus (or others) at the center
  999. %
  1000. %     ATOMLIST: list of heteroatoms (max 5 atoms)
  1001. %
  1002. %       for n = 1 to 5
  1003. %
  1004. %           n          : Hetero atom, e.g. N, O, etc. at n-position
  1005. %                        e.g. 1==N for N at 1-position
  1006. %
  1007. %     SUBSLIST: list of substituents (max 5 substitution positions)
  1008. %
  1009. %       for n = 1 to 5 
  1010. %
  1011. %           nD         :  exocyclic double bond at n-atom
  1012. %           n or nS    :  exocyclic single bond at n-atom
  1013. %           nA         :  alpha single bond at n-atom
  1014. %           nB         :  beta single bond at n-atom
  1015. %           nSA        :  alpha single bond at n-atom (boldface)
  1016. %           nSB        :  beta single bond at n-atom (dotted line)
  1017. %           nSa        :  alpha (not specified) single bond at n-atom
  1018. %           nSb        :  beta (not specified) single bond at n-atom
  1019. %
  1020. %       e.g. 
  1021. %        
  1022. %        \fiveheterohi{1==N}{1==H;2==F}
  1023. %        \fiveheterohi[c]{1==N}{1==Cl;4==F;2==CH$_{3}$}
  1024. %        \fiveheterohi[eb]{1==N}{1D==O;4SA==MeO;4SB==OMe;5W==Cl;6==Cl}
  1025. %
  1026. \def\fiveheterohi{\@ifnextchar[{\@fiveheterohi}{\@fiveheterohi[r]}}
  1027. \def\@fiveheterohi[#1]#2#3{%
  1028. \iniatom\iniflag%initialize
  1029. \@forsemicol\member:=#2\do{%
  1030. \expandafter\@m@mb@r\member;\relax%
  1031. \expandafter\twoch@r\@membera{}%
  1032. \ifcase\@tmpa%
  1033.  \or \xdef\aaa{\@memberb}%
  1034.  \or \xdef\bbb{\@memberb}%
  1035.  \or \xdef\ccc{\@memberb}%
  1036.  \or \xdef\eee{\@memberb}%
  1037.  \or \xdef\fff{\@memberb}%
  1038. \fi}%
  1039. \begin{picture}(800,880)(-240,-400)%
  1040.   \iforigpt \put(-\shifti,-\shiftii){\circle*{50}}%
  1041.            \put(-\noshift,-\noshift){\circle{50}}% 
  1042.    \typeout{command `fiveheterohi' origin: %
  1043.     (\the\noshift,\the\noshift) ---> (\the\shifti,\the\shiftii)}\fi%
  1044. %%%%%%%%%%%%%%%%%%
  1045. % outer skeleton %
  1046. %%%%%%%%%%%%%%%%%%
  1047. \hskbonda%bond between 1 and 2
  1048. \hskbondb%bond between 2 and 3
  1049. \hskbonde%bond between 4 and 5
  1050. \hskbondf%bond between 1 and 5
  1051. \hskbondverti% bond between 3 and 4
  1052. %%%%%%%%%%%%%%%%%%%%%
  1053. % inner double bond %
  1054. %%%%%%%%%%%%%%%%%%%%%
  1055. \@tfor\member:=#1\do{%
  1056. \if\member r%
  1057. \else \if\member a\relax \hbonda%
  1058. \else \if\member b\relax \hbondb%
  1059. \else \if\member c\relax \hbondverti%
  1060. \else \if\member d\relax \hbonde%
  1061. \else \if\member e\relax \hbondf%
  1062. \else \if\member A%left aromatic circle 
  1063.   \put(173,0){\circle{180}}%               %circle
  1064. \else \expandafter\twoch@@r\member{}{}%    %plus or minus charges
  1065.       \if\@@tmpa 1\relax%
  1066.         \putratom{-38}{282}{\@@tmpb}%      % right type
  1067.       \else\if\@@tmpa 2\relax%
  1068.         \putratom{60}{233}{\@@tmpb}%       % right type
  1069.       \else\if\@@tmpa 3\relax%
  1070.         \putratom{60}{120}{\@@tmpb}%       % right type
  1071.       \else\if\@@tmpa 4\relax%
  1072.         \putratom{-60}{120}{\@@tmpb}%      % right type
  1073.       \else\if\@@tmpa 5\relax%
  1074.         \putratom{-60}{233}{\@@tmpb}%      % right type
  1075.       \else\if\@@tmpa 0\relax%
  1076.         \putratom{140}{-30}{\@@tmpb}%      % right type
  1077.       \fi\fi\fi\fi\fi\fi%
  1078. \fi\fi\fi\fi\fi\fi\fi}%
  1079. %%%%%%%%%%%%%%%%%%%%%%%%
  1080. % setting hetero atoms %
  1081. %%%%%%%%%%%%%%%%%%%%%%%%
  1082. \ifx\aaa\empty\else%
  1083.      \@acliptrue%
  1084.      \putlatom{50}{-36}{\aaa}%             % left type
  1085. %     \putlatom{60}{-36}{\aaa}%             % left type
  1086. \fi%
  1087. \ifx\bbb\empty\else%
  1088.      \@bcliptrue%
  1089.      \putlatom{135}{141}{\bbb}%            % left type
  1090. \fi%
  1091. \ifx\ccc\empty\else%
  1092.      \@ccliptrue%
  1093.      \putratom{273}{141}{\ccc}%            % right type
  1094. \fi%
  1095. \ifx\fff\empty\else%
  1096.      \@fcliptrue%
  1097.      \putlatom{135}{-211}{\fff}%           % left type
  1098. \fi%
  1099. \ifx\eee\empty\else%
  1100.      \@ecliptrue%
  1101.      \putratom{273}{-211}{\eee}%           % left type
  1102. \fi%
  1103. %%%%%%%%%%%%%%%%%%%%%%%%
  1104. % setting substituents %
  1105. %%%%%%%%%%%%%%%%%%%%%%%%
  1106. \setsixringh{#3}{0}{0}{4}{0}%              % for 1 to 3
  1107. \setsixringh{#3}{1}{4}{7}{0}%              % for 4 to 5
  1108. \end{picture}\iniatom\iniflag}%         %end of \fiveheterohi macro
  1109. %
  1110. % ***********************************
  1111. % * pyrrole derivatives  and others *
  1112. % *  (horizontal type)              *
  1113. % ***********************************
  1114. %
  1115. %   \pyrroleh[BONDLIST]{SUBSLIST}
  1116. %   \pyrazoleh[BONDLIST]{SUBSLIST}
  1117. %   \imidazoleh[BONDLIST]{SUBSLIST}
  1118. %   \isoxazoleh[BONDLIST]{SUBSLIST}
  1119. %   \oxazoleh[BONDLIST]{SUBSLIST}
  1120. %  
  1121. %     BONDLIST: list of inner double bonds 
  1122. %
  1123. %           none       :  mother nucleus
  1124. %           H or []    :  fully saturated form
  1125. %           a          :  1,2-double bond
  1126. %           b          :  2,3-double bond
  1127. %           c          :  4,3-double bond
  1128. %           d          :  4,5-double bond
  1129. %           e          :  5,1-double bond
  1130. %           {n+}       :  plus at the n-nitrogen atom (n = 1 to 4)
  1131. %
  1132. %     SUBSLIST: list of substituents (max 6 substitution positions)
  1133. %
  1134. %       for n = 1 to 5 
  1135. %
  1136. %           nD         :  exocyclic double bond at n-atom
  1137. %           n or nS    :  exocyclic single bond at n-atom
  1138. %           nA         :  alpha single bond at n-atom
  1139. %           nB         :  beta single bond at n-atom
  1140. %           nSA        :  alpha single bond at n-atom (boldface)
  1141. %           nSB        :  beta single bond at n-atom (dotted line)
  1142. %           nSa        :  alpha (not specified) single bond at n-atom
  1143. %           nSb        :  beta (not specified) single bond at n-atom
  1144. %
  1145. %       e.g. 
  1146. %        
  1147. %        \pyrroleh{1==H;2==F}
  1148. %        \pyrroleh[]{1==H;2==F}
  1149. %        \pyrroleh[H]{1==H;2==F}
  1150. %        \imidazoleh[c]{1==Cl;4==F;2==CH$_{3}$}
  1151. %        \isoxazoleh[eb]{1==N}{1D==O;4SA==MeO;4SB==OMe;5W==Cl;6==Cl}
  1152. %
  1153. \def\pyrroleh{\@ifnextchar[{\@pyrroleh}{\@pyrroleh[bd]}}%
  1154. \def\@pyrroleh[#1]#2{%
  1155. \iforigpt \typeout{command `pyrroleh' is based on `fiveheteroh'.}\fi%
  1156. \fiveheteroh[#1]{1==N}{#2}}%
  1157. \def\pyrazoleh{\@ifnextchar[{\@pyrazoleh}{\@pyrazoleh[bd]}}%
  1158. \def\@pyrazoleh[#1]#2{%
  1159. \iforigpt \typeout{command `pyrazoleh' is based on `fiveheteroh'.}\fi%
  1160. \fiveheteroh[#1]{1==N;2==N}{#2}}%
  1161. \def\imidazoleh{\@ifnextchar[{\@imidazoleh}{\@imidazoleh[bd]}}%
  1162. \def\@imidazoleh[#1]#2{%
  1163. \iforigpt \typeout{command `imidazoleh' is based on `fiveheteroh'.}\fi%
  1164. \fiveheteroh[#1]{1==N;3==N}{#2}}%
  1165. \def\isoxazoleh{\@ifnextchar[{\@isoxazoleh}{\@isoxazoleh[bd]}}%
  1166. \def\@isoxazoleh[#1]#2{%
  1167. \iforigpt \typeout{command `isoxazoleh' is based on `fiveheteroh'.}\fi%
  1168. \fiveheteroh[#1]{1==O;2==N}{#2}}%
  1169. \def\oxazoleh{\@ifnextchar[{\@oxazoleh}{\@oxazoleh[bd]}}%
  1170. \def\@oxazoleh[#1]#2{%
  1171. \iforigpt \typeout{command `oxazoleh' is based on `fiveheteroh'.}\fi%
  1172. \fiveheteroh[#1]{1==O;3==N}{#2}}%
  1173. %
  1174. % *************************************
  1175. % * pyrrole derivatives  and others   *
  1176. % *  (horizontal type, inverse)       *
  1177. % *************************************
  1178. %
  1179. %   \pyrrolehi[BONDLIST]{SUBSLIST}
  1180. %   \pyrazolehi[BONDLIST]{SUBSLIST}
  1181. %   \imidazolehi[BONDLIST]{SUBSLIST}
  1182. %   \isoxazolehi[BONDLIST]{SUBSLIST}
  1183. %   \oxazolehi[BONDLIST]{SUBSLIST}
  1184. %  
  1185. %     BONDLIST: list of inner double bonds 
  1186. %
  1187. %           none       :  mother nucleus
  1188. %           H or []    :  fully saturated form
  1189. %           a          :  1,2-double bond
  1190. %           b          :  2,3-double bond
  1191. %           c          :  4,3-double bond
  1192. %           d          :  4,5-double bond
  1193. %           e          :  5,1-double bond
  1194. %           {n+}       :  plus at the n-nitrogen atom (n = 1 to 4)
  1195. %
  1196. %     SUBSLIST: list of substituents (max 6 substitution positions)
  1197. %
  1198. %       for n = 1 to 5 
  1199. %
  1200. %           nD         :  exocyclic double bond at n-atom
  1201. %           n or nS    :  exocyclic single bond at n-atom
  1202. %           nA         :  alpha single bond at n-atom
  1203. %           nB         :  beta single bond at n-atom
  1204. %           nSA        :  alpha single bond at n-atom (boldface)
  1205. %           nSB        :  beta single bond at n-atom (dotted line)
  1206. %           nSa        :  alpha (not specified) single bond at n-atom
  1207. %           nSb        :  beta (not specified) single bond at n-atom
  1208. %
  1209. %       e.g. 
  1210. %        
  1211. %        \pyrrolehi{1==H;2==F}
  1212. %        \pyrrolehi[]{1==H;2==F}
  1213. %        \pyrrolehi[H]{1==H;2==F}
  1214. %        \imidazolehi[c]{1==Cl;4==F;2==CH$_{3}$}
  1215. %        \isoxazolehi[eb]{1==N}{1D==O;4SA==MeO;4SB==OMe;5W==Cl;6==Cl}
  1216. %
  1217. \def\pyrrolehi{\@ifnextchar[{\@pyrrolehi}{\@pyrrolehi[bd]}}%
  1218. \def\@pyrrolehi[#1]#2{%
  1219. \iforigpt \typeout{command `pyrrolehi' is based on `fiveheterohi'.}\fi%
  1220. \fiveheterohi[#1]{1==N}{#2}}%
  1221. \def\pyrazolehi{\@ifnextchar[{\@pyrazolehi}{\@pyrazolehi[bd]}}%
  1222. \def\@pyrazolehi[#1]#2{%
  1223. \iforigpt \typeout{command `pyrazolehi' is based on `fiveheterohi'.}\fi%
  1224. \fiveheterohi[#1]{1==N;2==N}{#2}}%
  1225. \def\imidazolehi{\@ifnextchar[{\@imidazolehi}{\@imidazolehi[bd]}}%
  1226. \def\@imidazolehi[#1]#2{%
  1227. \iforigpt \typeout{command `imidazolehi' is based on `fiveheterohi'.}\fi%
  1228. \fiveheterohi[#1]{1==N;3==N}{#2}}%
  1229. \def\isoxazolehi{\@ifnextchar[{\@isoxazolehi}{\@isoxazolehi[bd]}}%
  1230. \def\@isoxazolehi[#1]#2{%
  1231. \iforigpt \typeout{command `isoxazolehi' is based on `fiveheterohi'.}\fi%
  1232. \fiveheterohi[#1]{1==O;2==N}{#2}}%
  1233. \def\oxazolehi{\@ifnextchar[{\@oxazolehi}{\@oxazolehi[bd]}}%
  1234. \def\@oxazolehi[#1]#2{%
  1235. \iforigpt \typeout{command `oxazolehi' is based on `fiveheterohi'.}\fi%
  1236. \fiveheterohi[#1]{1==O;3==N}{#2}}%
  1237. %
  1238. % ****************************
  1239. % * decahetero derivatives   *
  1240. % *  (horizontal type)       *
  1241. % ****************************
  1242. % The following numbering is adopted in this macro. 
  1243. %
  1244. %           2   3
  1245. %
  1246. %      *1          4           (*1 origin)
  1247. %
  1248. %      (10)8a   4a(9)
  1249. %
  1250. %       8          5
  1251. %
  1252. %           7   6
  1253. %   ____                     ____
  1254. %  |cf.                          |
  1255. %  |        8 (10)1              |
  1256. %  |        *  8a *              |
  1257. %  |   7  *   * *   *  2         |
  1258. %  |     |     |     |           |
  1259. %  |     |     |     |           |
  1260. %  |   6  *   * *   *  3         |
  1261. %  |        *  4a *              |
  1262. %  |        5 (9) 4              |
  1263. %  |        ^                    |
  1264. %  |        |                    |
  1265. %  |        the original point   |
  1266. %  |____                     ____|
  1267. %
  1268. %   \decaheteroh[BONDLIST]{ATOMLIST}{SUBSLIST}
  1269. %  
  1270. %     BONDLIST:  list of bonds 
  1271. %
  1272. %           none or r  :  decahetero (right-handed)
  1273. %           l          :  no action
  1274. %           H or []    :  fully saturated form
  1275. %           a    :  1,2-double bond      b    :  2,3-double bond
  1276. %           c    :  4,3-double bond      d    :  4,4a-double bond
  1277. %           e    :  4a,5-double bond     f    :  5,6-double bond
  1278. %           g    :  6,7-double bond      h    :  7,8-double bond
  1279. %           i    :  8,8a-double bond     j    :  1,8a-double bond
  1280. %           k    :  4a,8a-double bond
  1281. %           A    :  aromatic circle      B    :  aromatic circle
  1282. %           {n+}       :  plus at the n-nitrogen atom (n = 1 to 4)
  1283. %
  1284. %     ATOMLIST: list of heteroatoms (max 10 atoms)
  1285. %
  1286. %       for n = 1 to 8
  1287. %
  1288. %            n         : Hetero atom, e.g. N, O, etc. at n-position
  1289. %                        e.g. 1==N for N at 1-position
  1290. %            na        : Hetero atom at 4a or 8b (n=4 or 8)
  1291. %                        e.g. 4a==N (or 9==N) for N at 4a-position
  1292. %                             8a==N (or {{10}}==N) for N at 8a-position
  1293. %
  1294. %     SUBSLIST: list of substituents (max 8 substitution positions)
  1295. %
  1296. %       for n = 1 to 8
  1297. %
  1298. %           nD         :  exocyclic double bond at n-atom
  1299. %           n or nS    :  exocyclic single bond at n-atom
  1300. %           nA         :  alpha single bond at n-atom
  1301. %           nB         :  beta single bond at n-atom
  1302. %           nSA        :  alpha single bond at n-atom (boldface)
  1303. %           nSB        :  beta single bond at n-atom (dotted line)
  1304. %           nSa        :  alpha (not specified) single bond at n-atom
  1305. %           nSb        :  beta (not specified) single bond at n-atom
  1306. %
  1307. %       for 9 (4a position) and 10 (8a position)
  1308. %
  1309. %           nD         :  exocyclic double bond at n-atom
  1310. %           n or nS    :  exocyclic single bond at n-atom
  1311. %           nA         :  alpha single bond at n-atom
  1312. %           nB         :  beta single bond at n-atom
  1313. %
  1314. %       e.g. 
  1315. %        
  1316. %        \decaheteroh{1==N}{1==Cl;2==F}
  1317. %        \decaheteroh[c]{1==N}{1==Cl;4==F;2==CH$_{3}$}
  1318. %        \decaheteroh[eb]{1==N}{1D==O;4SA==MeO;4SB==OMe;5W==Cl;6==Cl}
  1319. %
  1320. \def\decaheteroh{\@ifnextchar[{\@decaheteroh}{\@decaheteroh[r]}}
  1321. \def\@decaheteroh[#1]#2#3{%
  1322. %%%%%%%%%%%%%%%%%%%%%%%%%%
  1323. % treatment of atom list %
  1324. %%%%%%%%%%%%%%%%%%%%%%%%%%
  1325. \iniflag\iniatom%
  1326. \@forsemicol\member:=#2\do{%
  1327. \expandafter\@m@mb@r\member;\relax%
  1328. \expandafter\twoch@r\@membera{}%
  1329. \ifcase\@tmpa%
  1330.  \or \xdef\aaa{\@memberb}%1
  1331.  \or \xdef\bbb{\@memberb}%2
  1332.  \or \xdef\ccc{\@memberb}%3
  1333.  \or%
  1334.    \if\@tmpb a%
  1335.      \xdef\iii{\@memberb}%4a
  1336.    \else\ifx\@tmpb\empty%
  1337.      \xdef\ddd{\@memberb}%4
  1338.    \fi\fi%
  1339.  \or \xdef\eee{\@memberb}%5
  1340.  \or \xdef\fff{\@memberb}%6
  1341.  \or \xdef\ggg{\@memberb}%7
  1342.  \or%
  1343.    \if\@tmpb a%
  1344.      \xdef\jjj{\@memberb}%8a
  1345.    \else\ifx\@tmpb\empty%
  1346.      \xdef\hhh{\@memberb}%8
  1347.    \fi\fi%
  1348. \or \xdef\iii{\@memberb}%9 (= 4a)
  1349. \or \xdef\jjj{\@memberb}%10 (= 8a)
  1350. \fi}%
  1351. \begin{picture}(1200,1200)(-400,-800)
  1352.   \iforigpt \put(-\shiftii,-\shiftiii){\circle*{50}}%
  1353.            \put(-\noshift,-\noshift){\circle{50}}% 
  1354.    \typeout{command `decaheteroh' origin: %
  1355.     (\the\noshift,\the\noshift) ---> (\the\shiftii,\the\shiftiii)}\fi%
  1356. %%%%%%%%%%%%%%%%%%
  1357. % outer skeleton %
  1358. %%%%%%%%%%%%%%%%%%
  1359. {\let\fff=\jjj \let\eee=\iii%
  1360.  \put(0,0){\hskbonda}% bond between 1 and 2
  1361.  \put(0,0){\hskbondb}% bond between 3 and 2
  1362.  \put(0,0){\hskbondc}% bond between 4 and 3
  1363.  \put(0,0){\hskbondf}% bond between 1 and 6
  1364.  \put(0,0){\hskbondd}% bond between 4 and 4a
  1365.  \put(0,0){\hskbonde}% bond between 4a and 8a
  1366. }%
  1367. {\let\aaa=\hhh \let\ddd=\eee\let\eee=\fff\let\fff=\ggg%
  1368.  \let\ccc=\iii\let\bbb=\jjj%
  1369.  \put(0,-342){\hskbonda}% bond between 8 and 8a
  1370.  \put(0,-342){\hskbondc}% bond between 5 and 4a
  1371.  \put(0,-342){\hskbondf}% bond between 8 and 7
  1372.  \put(0,-342){\hskbondd}% bond between 5 and 6
  1373.  \put(0,-342){\hskbonde}% bond between 6 and 7
  1374. }%
  1375. %%%%%%%%%%%%%%%%%%%%%
  1376. % inner double bond %
  1377. %%%%%%%%%%%%%%%%%%%%%
  1378. \@tfor\member:=#1\do{%
  1379. \if\member r\relax%
  1380. {\let\fff=\jjj \let\eee=\iii%
  1381.  \put(0,0){\hbonda}% bond between 1 and 2%
  1382.  \put(0,0){\hbondc}% bond between 3 and 4%
  1383. }%
  1384. {\let\aaa=\hhh \let\ddd=\eee\let\eee=\fff\let\fff=\ggg%
  1385.  \let\ccc=\iii\let\bbb=\jjj%
  1386.  \put(0,-342){\hbondb}% bond between 8a and 4a
  1387.  \put(0,-342){\hbondf}% bond between 8 and 7
  1388.  \put(0,-342){\hbondd}% bond between 5 and 6
  1389. }%
  1390. \else \if\member l\relax%
  1391. \else \if\member a\relax%
  1392.  \put(0,0){\hbonda}% bond between 1 and 2
  1393. \else \if\member b\relax%
  1394.  \put(0,0){\hbondb}% bond between 2 and 3
  1395. \else \if\member c\relax%
  1396.  \put(0,0){\hbondc}% bond between 3 and 4
  1397. % \put(342,0){\hbondc}% bond between 3 and 4
  1398. \else \if\member d\relax%
  1399. {\let\eee=\iii%
  1400.  \put(0,0){\hbondd}% bond between 4 and 4a
  1401. }%
  1402. \else \if\member e\relax%
  1403. {\let\ccc=\iii \let\ddd=\eee%
  1404.  \put(0,-342){\hbondc}% bond between 5 and 4a
  1405. }%
  1406. \else \if\member f\relax%
  1407. {\let\ddd=\eee \let\eee=\fff%
  1408.  \put(0,-342){\hbondd}% bond between 5 and 6
  1409. }%
  1410. \else \if\member g\relax%
  1411. {\let\eee=\fff \let\fff=\ggg% 
  1412.  \put(0,-342){\hbonde}% bond between 6 and 7
  1413. }%
  1414. \else \if\member h\relax%
  1415. {\let\aaa=\hhh \let\fff=\ggg%
  1416.  \put(0,-342){\hbondf}% bond between 8 and 7
  1417. }%
  1418. \else \if\member i\relax%
  1419. {\let\aaa=\hhh \let\bbb=\jjj%
  1420.  \put(0,-342){\hbonda}% bond between 8 and 8a
  1421. }%
  1422. \else \if\member j\relax%
  1423. {\let\fff=\jjj%
  1424.  \put(0,0){\hbondf}% bond between 1 and 8a
  1425. }%
  1426. \else \if\member k\relax%
  1427. {\let\ccc=\iii\let\bbb=\jjj%
  1428.  \put(0,-342){\hbondb}% bond between 8a and 4a
  1429. }%
  1430. \else \if\member A%left aromatic circle 
  1431.   \put(203,0){\circle{240}}%                %circle
  1432. \else \if\member B%left aromatic circle 
  1433.   \put(203,-342){\circle{240}}%             %circle
  1434. \else \expandafter\twoch@@r\member{}{}%
  1435.   \def\aax{8a} \def\aay{4a} \def\aaz{10}%
  1436.       \if\@@tmpa 4\relax%
  1437.         \putratom{272}{-18}{\@@tmpb}%       % right type
  1438.       \else\if\@@tmpa 1\relax%
  1439.         \putratom{68}{-18}{\@@tmpb}%        % right type
  1440.       \else\if\@@tmpa 3\relax%
  1441.         \putratom{233}{60}{\@@tmpb}%        % right type
  1442.       \else\if\@@tmpa 2\relax%
  1443.         \putratom{120}{60}{\@@tmpb}%        % right type
  1444.       \else\ifx\@@tmpa\aaz\relax%
  1445.         \putratom{120}{-110}{\@@tmpb}%      % right type
  1446.       \else\ifx\@@tmpa\aax\relax%
  1447.         \putratom{120}{-110}{\@@tmpb}%      % right type
  1448.       \else\ifx\@@tmpa\aay\relax
  1449.         \putratom{233}{-110}{\@@tmpb}%      % right type
  1450.       \else\if\@@tmpa 9\relax%
  1451.         \putratom{233}{-110}{\@@tmpb}%      % right type
  1452.       \else\if\@@tmpa 5\relax%
  1453.         \putratom{272}{-360}{\@@tmpb}%      % right type
  1454.       \else\if\@@tmpa 8\relax%
  1455.         \putratom{68}{-360}{\@@tmpb}%       % right type
  1456.       \else\if\@@tmpa 6\relax%
  1457.         \putratom{233}{-452}{\@@tmpb}%      % right type
  1458.       \else\if\@@tmpa 7\relax%
  1459.         \putratom{120}{-452}{\@@tmpb}%      % right type
  1460.      \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
  1461. \fi\fi\fi\fi\fi\fi\fi\fi\fi%
  1462. \fi\fi\fi\fi\fi\fi}%
  1463. %%%%%%%%%%%%%%%%%%%%%%%%
  1464. % setting hetero atoms %
  1465. %%%%%%%%%%%%%%%%%%%%%%%%
  1466. % hetero atom on 1
  1467. \ifx\aaa\empty\else%
  1468.      \@acliptrue%
  1469.      \putlatom{60}{-36}{\aaa}%              % left type
  1470. \fi%
  1471. % hetero atom on 2
  1472. \ifx\bbb\empty\else%
  1473.      \@bcliptrue%
  1474.      \putlatom{135}{141}{\bbb}%             % left type
  1475. \fi%
  1476. % hetero atom on 3
  1477. \ifx\ccc\empty\else%
  1478.      \@ccliptrue%
  1479.      \putratom{273}{141}{\ccc}%             % right type
  1480. \fi%
  1481. % hetero atom on 4
  1482. \ifx\ddd\empty\else%
  1483.    \@cliptrue%
  1484.    \putratom{346}{-36}{\ddd}%               % right type
  1485. \fi%
  1486. % hetero atom on 4a
  1487. {\let\eee=\iii%
  1488. \ifx\eee\empty\else%
  1489.      \global\@icliptrue%
  1490.      \putratom{273}{-211}{\iii}%            % right type
  1491. \fi%
  1492. }%
  1493. % hetero atom on 8a
  1494. {\let\fff=\jjj%
  1495. \ifx\fff\empty\else%
  1496.      \global\@jcliptrue%
  1497.      \putlatom{135}{-211}{\jjj}%            % left type
  1498. \fi%
  1499. }%
  1500. % hetero atom on 5
  1501. {\let\ddd=\eee%
  1502. \ifx\ddd\empty\else
  1503.    \global\@ecliptrue%
  1504.    \putratom{346}{-378}{\eee}%              % right type
  1505. \fi%
  1506. }%
  1507. % hetero atom on 6
  1508. {\let\eee=\fff%
  1509. \ifx\eee\empty\else%
  1510.      \global\@fcliptrue%
  1511.      \putratom{273}{-553}{\fff}%             % left type
  1512. \fi%
  1513. }%
  1514. % hetero atom on 7
  1515. {\let\fff=\ggg%
  1516. \ifx\fff\empty\else%
  1517.      \global\@gcliptrue%
  1518.      \putlatom{135}{-553}{\ggg}%             % left type
  1519. \fi%
  1520. }%
  1521. % hetero atom on 8
  1522. {\let\aaa=\hhh%
  1523. \ifx\aaa\empty\else%
  1524.      \global\@hcliptrue%
  1525.      \putlatom{60}{-378}{\hhh}%              % left type
  1526. \fi%
  1527. }%
  1528. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1529. % setting substituents and exocyclic bonds %
  1530. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1531. \put(0,0){\setsixringh{#3}{0}{0}{5}{0}}% %substituents on 1 to 4
  1532. {\@clipfalse \if@eclip \@cliptrue \fi%   %substituents on 5 to 7
  1533.  \@eclipfalse \if@fclip \@ecliptrue \fi%
  1534.  \@fclipfalse \if@gclip \@fcliptrue \fi%
  1535. \put(0,-342){\setsixringh{#3}{-1}{3}{7}{0}}%
  1536. }%
  1537. {\@aclipfalse \if@hclip \@acliptrue \fi%   %substituent on 8
  1538. \put(0,-342){\setsixringh{#3}{-7}{0}{2}{0}}%
  1539. }%
  1540. {\@clipfusefalse \if@iclip \@clipfusetrue \fi%
  1541.  \put(303,-171){\setatombond{#3}{-8}{4}}   %9 for 4a position
  1542. }%
  1543. {\@clipfusefalse \if@jclip \@clipfusetrue \fi%
  1544.   \put(103,-171){\setatombond{#3}{-9}{10}} %10 for 8a position
  1545. }%
  1546. \end{picture}\iniatom\iniflag}%      %end of \decaheteroh macro
  1547. %
  1548. % ************************************
  1549. % * decahetero derivatives           *
  1550. % *  (horizonatl type, inverse type) *
  1551. % ************************************
  1552. % The following numbering is adopted in this macro. 
  1553. %
  1554. %           3   2
  1555. %
  1556. %      *4          1           (*4 origin)
  1557. %
  1558. %       (8)4a   8a(10)
  1559. %
  1560. %       5          8
  1561. %
  1562. %           6   7
  1563. %   ____                     ____
  1564. %  |cf.                          |
  1565. %  |        5 (9) 4              |
  1566. %  |        *  4a *              |
  1567. %  |   6  *   * *   *  3         |
  1568. %  |     |     |     |           |
  1569. %  |     |     |     |           |
  1570. %  |   7  *   * *   *  2         |
  1571. %  |        *  8a *              |
  1572. %  |        8 (9) 1              |
  1573. %  |        ^                    |
  1574. %  |        |                    |
  1575. %  |        the original point   |
  1576. %  |____                     ____|
  1577. %
  1578. %   \decaheterohi[BONDLIST]{ATOMLIST}{SUBSLIST}
  1579. %  
  1580. %     BONDLIST:  list of bonds 
  1581. %
  1582. %           none or r  :  decahetero (right-handed)
  1583. %           l          :  no action
  1584. %           H or []    :  fully saturated form
  1585. %           a    :  1,2-double bond      b    :  2,3-double bond
  1586. %           c    :  4,3-double bond      d    :  4,4a-double bond
  1587. %           e    :  4a,5-double bond     f    :  5,6-double bond
  1588. %           g    :  6,7-double bond      h    :  7,8-double bond
  1589. %           i    :  8,8a-double bond     j    :  1,8a-double bond
  1590. %           k    :  4a,8a-double bond
  1591. %           A    :  aromatic circle      B    :  aromatic circle
  1592. %           {n+}       :  plus at the n-nitrogen atom (n = 1 to 4)
  1593. %
  1594. %     ATOMLIST: list of heteroatoms (max 10 atoms)
  1595. %
  1596. %       for n = 1 to 8
  1597. %
  1598. %            n         : Hetero atom, e.g. N, O, etc. at n-position
  1599. %                        e.g. 1==N for N at 1-position
  1600. %            na        : Hetero atom at 4a or 8b (n=4 or 8)
  1601. %                        e.g. 4a==N (or 9==N) for N at 4a-position
  1602. %                             8a==N (or {{10}}==N) for N at 8a-position
  1603. %
  1604. %     SUBSLIST: list of substituents (max 8 substitution positions)
  1605. %
  1606. %       for n = 1 to 8
  1607. %
  1608. %           nD         :  exocyclic double bond at n-atom
  1609. %           n or nS    :  exocyclic single bond at n-atom
  1610. %           nA         :  alpha single bond at n-atom
  1611. %           nB         :  beta single bond at n-atom
  1612. %           nSA        :  alpha single bond at n-atom (boldface)
  1613. %           nSB        :  beta single bond at n-atom (dotted line)
  1614. %           nSa        :  alpha (not specified) single bond at n-atom
  1615. %           nSb        :  beta (not specified) single bond at n-atom
  1616. %
  1617. %       for 9 (4a position) and 10 (8a position)
  1618. %
  1619. %           nD         :  exocyclic double bond at n-atom
  1620. %           n or nS    :  exocyclic single bond at n-atom
  1621. %           nA         :  alpha single bond at n-atom
  1622. %           nB         :  beta single bond at n-atom
  1623. %
  1624. %       e.g. 
  1625. %        
  1626. %        \decaheterohi{1==N}{1==Cl;2==F}
  1627. %        \decaheterohi[c]{1==N}{1==Cl;4==F;2==CH$_{3}$}
  1628. %        \decaheterohi[eb]{1==N}{1D==O;4SA==MeO;4SB==OMe;5W==Cl;6==Cl}
  1629. %
  1630. \def\decaheterohi{\@ifnextchar[{\@decaheterohi}{\@decaheterohi[r]}}
  1631. \def\@decaheterohi[#1]#2#3{%
  1632. %%%%%%%%%%%%%%%%%%%%%%%%%%
  1633. % treatment of atom list %
  1634. %%%%%%%%%%%%%%%%%%%%%%%%%%
  1635. \iniflag\iniatom%
  1636. \@forsemicol\member:=#2\do{%
  1637. \expandafter\@m@mb@r\member;\relax%
  1638. \expandafter\twoch@r\@membera{}%
  1639. \ifcase\@tmpa%
  1640.  \or \xdef\ddd{\@memberb}%1
  1641.  \or \xdef\ccc{\@memberb}%2
  1642.  \or \xdef\bbb{\@memberb}%3
  1643.  \or%
  1644.    \if\@tmpb a%
  1645.      \xdef\jjj{\@memberb}%4a
  1646.    \else\ifx\@tmpb\empty%
  1647.      \xdef\aaa{\@memberb}%4
  1648.    \fi\fi%
  1649.  \or \xdef\hhh{\@memberb}%5
  1650.  \or \xdef\ggg{\@memberb}%6
  1651.  \or \xdef\fff{\@memberb}%7
  1652.  \or%
  1653.    \if\@tmpb a%
  1654.      \xdef\iii{\@memberb}%8a
  1655.    \else\ifx\@tmpb\empty%
  1656.      \xdef\eee{\@memberb}%8
  1657.    \fi\fi%
  1658. \or \xdef\jjj{\@memberb}%9 (= 4a)
  1659. \or \xdef\iii{\@memberb}%10 (= 8a)
  1660. \fi}%
  1661. \begin{picture}(1200,1200)(-400,-800)%
  1662.   \iforigpt \put(-\shiftii,-\shiftiii){\circle*{50}}%
  1663.            \put(-\noshift,-\noshift){\circle{50}}% 
  1664.    \typeout{command `decaheterohi' origin: %
  1665.     (\the\noshift,\the\noshift) ---> (\the\shiftii,\the\shiftiii)}\fi%
  1666. %%%%%%%%%%%%%%%%%%
  1667. % outer skeleton %
  1668. %%%%%%%%%%%%%%%%%%
  1669. {\let\fff=\jjj \let\eee=\iii%
  1670.  \put(0,0){\hskbonda}% bond between 1 and 2
  1671.  \put(0,0){\hskbondb}% bond between 3 and 2
  1672.  \put(0,0){\hskbondc}% bond between 4 and 3
  1673.  \put(0,0){\hskbondf}% bond between 1 and 6
  1674.  \put(0,0){\hskbondd}% bond between 4 and 4a
  1675.  \put(0,0){\hskbonde}% bond between 4a and 8a
  1676. }%
  1677. {\let\aaa=\hhh \let\ddd=\eee\let\eee=\fff\let\fff=\ggg%
  1678.  \let\ccc=\iii\let\bbb=\jjj%
  1679.  \put(0,-342){\hskbonda}% bond between 8 and 8a
  1680.  \put(0,-342){\hskbondc}% bond between 5 and 4a
  1681.  \put(0,-342){\hskbondf}% bond between 8 and 7
  1682.  \put(0,-342){\hskbondd}% bond between 5 and 6
  1683.  \put(0,-342){\hskbonde}% bond between 6 and 7
  1684. }%
  1685. %%%%%%%%%%%%%%%%%%%%%
  1686. % inner double bond %
  1687. %%%%%%%%%%%%%%%%%%%%%
  1688. \@tfor\member:=#1\do{%
  1689. \if\member r\relax%
  1690. {\let\fff=\jjj \let\eee=\iii%
  1691.  \put(0,0){\hbonda}% bond between 1 and 2
  1692.  \put(0,0){\hbondc}% bond between 3 and 4
  1693. }%
  1694. {\let\aaa=\hhh \let\ddd=\eee\let\eee=\fff\let\fff=\ggg%
  1695.  \let\ccc=\iii\let\bbb=\jjj%
  1696.  \put(0,-342){\hbondb}% bond between 8a and 4a
  1697.  \put(0,-342){\hbondf}% bond between 8 and 7
  1698.  \put(0,-342){\hbondd}% bond between 5 and 6
  1699. }%
  1700. \else \if\member l\relax%
  1701. \else \if\member a\relax%
  1702.  \put(0,0){\hbondc}% bond between 3 and 4
  1703. \else \if\member b\relax
  1704.  \put(0,0){\hbondb}% bond between 2 and 3
  1705. \else \if\member c\relax
  1706.  \put(0,0){\hbonda}% bond between 1 and 2
  1707. \else \if\member d\relax%
  1708. {\let\fff=\jjj%
  1709.  \put(0,0){\hbondf}% bond between 1 and 8a
  1710. }%
  1711. \else \if\member e\relax%
  1712. {\let\aaa=\hhh \let\bbb=\jjj%
  1713.  \put(0,-342){\hbonda}% bond between 8 and 8a
  1714. }%
  1715. \else \if\member f\relax%
  1716. {\let\aaa=\hhh \let\fff=\ggg%
  1717.  \put(0,-342){\hbondf}% bond between 8 and 7
  1718. }%
  1719. \else \if\member g\relax%
  1720. {\let\eee=\fff \let\fff=\ggg% 
  1721.  \put(0,-342){\hbonde}% bond between 6 and 7
  1722. }%
  1723. \else \if\member h\relax%
  1724. {\let\ddd=\eee \let\eee=\fff%
  1725.  \put(0,-342){\hbondd}% bond between 5 and 6
  1726. }%
  1727. \else \if\member i\relax%
  1728. {\let\ccc=\iii \let\ddd=\eee%
  1729.  \put(0,-342){\hbondc}% bond between 5 and 4a
  1730. }%
  1731. \else \if\member j\relax%
  1732. {\let\eee=\iii%
  1733.  \put(0,0){\hbondd}% bond between 4 and 4a
  1734. }%
  1735. \else \if\member k\relax%
  1736. {\let\ccc=\iii\let\bbb=\jjj%
  1737.  \put(0,-342){\hbondb}% bond between 8a and 4a
  1738. }%
  1739. \else \if\member A%left aromatic circle
  1740.   \put(203,0){\circle{240}}%                %circle
  1741. \else \if\member B%left aromatic circle 
  1742.   \put(203,-342){\circle{240}}%             %circle
  1743. \else \expandafter\twoch@@r\member{}{}%
  1744.   \def\aax{8a} \def\aay{4a} \def\aaz{10}%
  1745.       \if\@@tmpa 4\relax%
  1746.         \putratom{68}{-18}{\@@tmpb}%        % right type
  1747.       \else\if\@@tmpa 1\relax%
  1748.         \putratom{272}{-18}{\@@tmpb}%       % right type
  1749.       \else\if\@@tmpa 3\relax%
  1750.         \putratom{120}{60}{\@@tmpb}%        % right type
  1751.       \else\if\@@tmpa 2\relax%
  1752.         \putratom{233}{60}{\@@tmpb}%        % right type
  1753.       \else\ifx\@@tmpa\aaz\relax%
  1754.         \putratom{233}{-110}{\@@tmpb}%      % right type
  1755.       \else\ifx\@@tmpa\aax\relax%
  1756.         \putratom{233}{-110}{\@@tmpb}%      % right type
  1757.       \else\ifx\@@tmpa\aay\relax%
  1758.         \putratom{120}{-110}{\@@tmpb}%      % right type
  1759.       \else\if\@@tmpa 9\relax%
  1760.         \putratom{120}{-110}{\@@tmpb}%      % right type
  1761.       \else\if\@@tmpa 5\relax%
  1762.         \putratom{68}{-360}{\@@tmpb}%       % right type
  1763.       \else\if\@@tmpa 8\relax%
  1764.         \putratom{272}{-360}{\@@tmpb}%      % right type
  1765.       \else\if\@@tmpa 6\relax%
  1766.         \putratom{120}{-452}{\@@tmpb}%      % right type
  1767.       \else\if\@@tmpa 7\relax%
  1768.         \putratom{233}{-452}{\@@tmpb}%      % right type
  1769.      \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
  1770. \fi\fi\fi\fi\fi\fi\fi\fi\fi%
  1771. \fi\fi\fi\fi\fi\fi}%
  1772. %%%%%%%%%%%%%%%%%%%%%%%%
  1773. % setting hetero atoms %
  1774. %%%%%%%%%%%%%%%%%%%%%%%%
  1775. % hetero atom on 4   (1)
  1776. \ifx\aaa\empty\else%
  1777.      \@acliptrue%
  1778.      \putlatom{60}{-36}{\aaa}%               % left type
  1779. \fi%
  1780. % hetero atom on 3   (2)
  1781. \ifx\bbb\empty\else%
  1782.      \@bcliptrue%
  1783.      \putlatom{135}{141}{\bbb}%              % left type
  1784. \fi%
  1785. % hetero atom on 2   (3)
  1786. \ifx\ccc\empty\else%
  1787.      \@ccliptrue%
  1788.      \putratom{273}{141}{\ccc}%              % right type
  1789. \fi%
  1790. % hetero atom on 1   (4)
  1791. \ifx\ddd\empty\else%
  1792.    \@cliptrue%
  1793.    \putratom{346}{-36}{\ddd}%                % right type
  1794. \fi%
  1795. % hetero atom on 8a  (4a)
  1796. {\let\eee=\iii%
  1797. \ifx\eee\empty\else%
  1798.      \global\@icliptrue%
  1799.      \putratom{273}{-211}{\iii}%             % right type
  1800. \fi%
  1801. }%
  1802. % hetero atom on 4a   (8a)
  1803. {\let\fff=\jjj%
  1804. \ifx\fff\empty\else%
  1805.      \global\@jcliptrue%
  1806.      \putlatom{135}{-211}{\jjj}%             % left type
  1807. \fi%
  1808. }%
  1809. % hetero atom on 8    (5)
  1810. {\let\ddd=\eee%
  1811. \ifx\ddd\empty\else%
  1812.    \global\@ecliptrue%
  1813.    \putratom{346}{-378}{\eee}%               % right type
  1814. \fi%
  1815. }%
  1816. % hetero atom on 7    (6)
  1817. {\let\eee=\fff%
  1818. \ifx\eee\empty\else%
  1819.      \global\@fcliptrue%
  1820.      \putratom{273}{-553}{\fff}%             % left type
  1821. \fi%
  1822. }%
  1823. % hetero atom on 6    (7)
  1824. {\let\fff=\ggg%
  1825. \ifx\fff\empty\else%
  1826.      \global\@gcliptrue%
  1827.      \putlatom{135}{-553}{\ggg}%             % left type
  1828. \fi%
  1829. }%
  1830. % hetero atom on 5    (8)
  1831. {\let\aaa=\hhh%
  1832. \ifx\aaa\empty\else%
  1833.      \global\@hcliptrue%
  1834.      \putlatom{60}{-378}{\hhh}%              % left type
  1835. \fi%
  1836. }%
  1837. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1838. % setting substituents and exocyclic bonds %
  1839. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  1840. \put(0,0){\setsixringh{#3}{5}{0}{5}{-1}}% %substituents on 1 to 4
  1841. {\@clipfalse \if@eclip \@cliptrue \fi%    %substituents on 6 to 8
  1842.  \@eclipfalse \if@fclip \@ecliptrue \fi%
  1843.  \@fclipfalse \if@gclip \@fcliptrue \fi%
  1844. \put(0,-342){\setsixringh{#3}{12}{3}{7}{-1}}%
  1845. }%
  1846. {\@aclipfalse \if@hclip \@acliptrue \fi%    %substituent on 5
  1847. \put(0,-342){\setsixringh{#3}{-4}{0}{2}{0}}%
  1848. }%
  1849. {\@clipfusefalse \if@iclip \@clipfusetrue \fi%
  1850.  \put(303,-171){\setatombond{#3}{-9}{4}}%   %10 for 8a position
  1851. }%
  1852. {\@clipfusefalse \if@jclip \@clipfusetrue \fi
  1853.   \put(103,-171){\setatombond{#3}{-8}{10}}% %9 for 4a position
  1854. }%
  1855. \end{picture}\iniatom\iniflag}%      %end of \decaheterohi macro
  1856. %
  1857. % ****************************************************
  1858. % * heterocycles having two fused six-membered rings *
  1859. % *  (horizontal type)                               *
  1860. % ****************************************************
  1861. %
  1862. %   \quinolineh[BONDLIST]{SUBSLIST}
  1863. %   \quinolinehi[BONDLIST]{SUBSLIST}
  1864. %   \isoquinolineh[BONDLIST]{SUBSLIST}
  1865. %   \isoquinolinehi[BONDLIST]{SUBSLIST}
  1866. %   \quinoxalineh[BONDLIST]{SUBSLIST}
  1867. %   \quinazolineh[BONDLIST]{SUBSLIST}
  1868. %   \quinazolinehi[BONDLIST]{SUBSLIST}
  1869. %   \cinnolineh[BONDLIST]{SUBSLIST}
  1870. %   \cinnolinehi[BONDLIST]{SUBSLIST}
  1871. %   \pteridineh[BONDLIST]{SUBSLIST}
  1872. %   \pteridinehi[BONDLIST]{SUBSLIST}
  1873. %  
  1874. %     BONDLIST:  list of bonds 
  1875. %
  1876. %           none or r  :  decahetero (right-handed)
  1877. %           l          :  decahetero (left-handed)
  1878. %           H or []    :  fully saturated form
  1879. %           a    :  1,2-double bond      b    :  2,3-double bond
  1880. %           c    :  4,3-double bond      d    :  4,4a-double bond
  1881. %           e    :  4a,5-double bond     f    :  5,6-double bond
  1882. %           g    :  6,7-double bond      h    :  7,8-double bond
  1883. %           i    :  8,8a-double bond     j    :  1,8a-double bond
  1884. %           k    :  4a,8a-double bond
  1885. %           A    :  aromatic circle      B    :  aromatic circle
  1886. %           {n+}       :  plus at the n-nitrogen atom (n = 1 to 4)
  1887. %
  1888. %     SUBSLIST: list of substituents (max 6 substitution positions)
  1889. %
  1890. %       for n = 1 to 8
  1891. %
  1892. %           nD         :  exocyclic double bond at n-atom
  1893. %           n or nS    :  exocyclic single bond at n-atom
  1894. %           nA         :  alpha single bond at n-atom
  1895. %           nB         :  beta single bond at n-atom
  1896. %           nSA        :  alpha single bond at n-atom (boldface)
  1897. %           nSB        :  beta single bond at n-atom (dotted line)
  1898. %           nSa        :  alpha (not specified) single bond at n-atom
  1899. %           nSb        :  beta (not specified) single bond at n-atom
  1900. %
  1901. %       for 9 (4a position) and 10 (8a position)
  1902. %
  1903. %           nD         :  exocyclic double bond at n-atom
  1904. %           n or nS    :  exocyclic single bond at n-atom
  1905. %           nA         :  alpha single bond at n-atom
  1906. %           nB         :  beta single bond at n-atom
  1907. %
  1908. %       e.g. 
  1909. %        
  1910. %        \quinolineh{2==Cl;3==F}
  1911. %
  1912. \def\quinolineh{\@ifnextchar[{\@quinolineh}{\@quinolineh[acfhk]}}%
  1913. \def\@quinolineh[#1]#2{%
  1914. \iforigpt \typeout{command `quinolineh' is based on `decaheteroh'.}\fi%
  1915. \decaheteroh[#1]{1==N}{#2}}%
  1916. \def\quinolinehi{\@ifnextchar[{\@quinolinehi}{\@quinolinehi[acfhk]}}%
  1917. \def\@quinolinehi[#1]#2{%
  1918. \iforigpt \typeout{command `quinolinehi' is based on `decaheterohi'.}\fi%
  1919. \decaheterohi[#1]{1==N}{#2}}%
  1920. %
  1921. \def\isoquinolineh{\@ifnextchar[{\@isoquinolineh}{\@isoquinolineh[acfhk]}}%
  1922. \def\@isoquinolineh[#1]#2{%
  1923. \iforigpt \typeout{command `isoquinolineh' is based on `decaheteroh'.}\fi%
  1924. \decaheteroh[#1]{2==N}{#2}}%
  1925. \def\isoquinolinehi{\@ifnextchar[{\@isoquinolinehi}{\@isoquinolinehi[acfhk]}}%
  1926. \def\@isoquinolinehi[#1]#2{%
  1927. \iforigpt \typeout{command `isoquinolinehi' is based on `decaheterohi'.}\fi%
  1928. \decaheterohi[#1]{2==N}{#2}}%
  1929. %
  1930. \def\quinoxalineh{\@ifnextchar[{\@quinoxalineh}{\@quinoxalineh[acfhk]}}%
  1931. \def\@quinoxalineh[#1]#2{%
  1932. \iforigpt \typeout{command `quinoxalineh' is based on `decaheteroh'.}\fi%
  1933. \decaheteroh[#1]{1==N;4==N}{#2}}%
  1934. %
  1935. \def\quinazolineh{\@ifnextchar[{\@quinazolineh}{\@quinazolineh[acfhk]}}%
  1936. \def\@quinazolineh[#1]#2{%
  1937. \iforigpt \typeout{command `quinazolineh' is based on `decaheteroh'.}\fi%
  1938. \decaheteroh[#1]{1==N;3==N}{#2}}%
  1939. \def\quinazolinehi{\@ifnextchar[{\@quinazolinehi}{\@quinazolinehi[acfhk]}}%
  1940. \def\@quinazolinehi[#1]#2{%
  1941. \iforigpt \typeout{command `quinazolinehi' is based on `decaheterohi'.}\fi%
  1942. \decaheterohi[#1]{1==N;3==N}{#2}}%
  1943. %
  1944. \def\cinnolineh{\@ifnextchar[{\@cinnolineh}{\@cinnolineh[acfhk]}}%
  1945. \def\@cinnolineh[#1]#2{%
  1946. \iforigpt \typeout{command `cinnolineh' is based on `decaheteroh'.}\fi%
  1947. \decaheteroh[#1]{1==N;2==N}{#2}}%
  1948. \def\cinnolinehi{\@ifnextchar[{\@cinnolinehi}{\@cinnolinehi[acfhk]}}%
  1949. \def\@cinnolinehi[#1]#2{%
  1950. \iforigpt \typeout{command `cinnolinehi' is based on `decaheterohi'.}\fi%
  1951. \decaheterohi[#1]{1==N;2==N}{#2}}%
  1952. %
  1953. \def\pteridineh{\@ifnextchar[{\@pteridineh}{\@pteridineh[acfhk]}}%
  1954. \def\@pteridineh[#1]#2{%
  1955. \iforigpt \typeout{command `pteridineh' is based on `decaheteroh'.}\fi%
  1956. \decaheteroh[#1]{1==N;3==N;5==N;8==N}{#2}}%
  1957. \def\pteridinehi{\@ifnextchar[{\@pteridinehi}{\@pteridinehi[acfhk]}}%
  1958. \def\@pteridinehi[#1]#2{%
  1959. \iforigpt \typeout{command `pteridinehi' is based on `decaheterohi'.}\fi%
  1960. \decaheterohi[#1]{1==N;3==N;5==N;8==N}{#2}}%
  1961. %
  1962. % **************************
  1963. % * nonahetero derivatives *
  1964. % *  (horizontal type)     *
  1965. % **************************
  1966. % The following numbering is adopted in this macro. 
  1967. %
  1968. %           3   2
  1969. %
  1970. %                  1           (*1 origin)
  1971. %
  1972. %       (8)3a   7a(9)
  1973. %
  1974. %       4          7
  1975. %
  1976. %           5   6
  1977. %   ____                     ____
  1978. %  |cf.                          |
  1979. %  |        4 (8)               |
  1980. %  |        *  3a                |
  1981. %  |   5  *   * -----  3         |
  1982. %  |     |     |     |           |
  1983. %  |     |     |     |           |
  1984. %  |   6  *   * *   *  2         |
  1985. %  |        *  7a *              |
  1986. %  |        7 (9) 1              |
  1987. %  |        ^                    |
  1988. %  |        |                    |
  1989. %  |        the original point   |
  1990. %  |____                     ____|
  1991. %
  1992. %
  1993. %   \nonaheteroh[BONDLIST]{ATOMLIST}{SUBSLIST}
  1994. %  
  1995. %     BONDLIST:  list of bonds 
  1996. %
  1997. %           none or r  :  aromatic six-membered ring
  1998. %           H or []    :  fully saturated form
  1999. %           a    :  1,2-double bond      b    :  2,3-double bond
  2000. %           c    :  3,3a-double bond     d    :  4,3a-double bond
  2001. %           e    :  4,5-double bond      f    :  5,6-double bond
  2002. %           g    :  6,7-double bond      h    :  7,7a-double bond
  2003. %           i    :  1,7a-double bond     j    :  3a,4a-double bond
  2004. %           A    :  aromatic circle (six-membered)
  2005. %           B    :  aromatic circle (five-membered)
  2006. %           {n+} :  plus at the n-nitrogen atom (n = 1 to 7)
  2007. %           {0+} :  plus (or others) at the center 
  2008. %                    of the five-membered cycle
  2009. %
  2010. %     ATOMLIST: list of heteroatoms (max 9 atoms)
  2011. %
  2012. %       for n = 1 to 7
  2013. %
  2014. %            n         : Hetero atom, e.g. N, O, etc. at n-position
  2015. %                        e.g. 1==N for N at 1-position
  2016. %            na        : Hetero atom at 3a or 7b (n=3 or 7)
  2017. %                        e.g. 3a==N (or 8==N) for N at 4a-position
  2018. %                             7a==N (or 9==N) for N at 8a-position
  2019. %
  2020. %     SUBSLIST: list of substituents (max 7 substitution positions)
  2021. %
  2022. %       for n = 1 to 8
  2023. %
  2024. %           nD         :  exocyclic double bond at n-atom
  2025. %           n or nS    :  exocyclic single bond at n-atom
  2026. %           nA         :  alpha single bond at n-atom
  2027. %           nB         :  beta single bond at n-atom
  2028. %           nSA        :  alpha single bond at n-atom (boldface)
  2029. %           nSB        :  beta single bond at n-atom (dotted line)
  2030. %           nSa        :  alpha (not specified) single bond at n-atom
  2031. %           nSb        :  beta (not specified) single bond at n-atom
  2032. %
  2033. %       for 8 (3a position) and 9 (7a position)
  2034. %
  2035. %           nD         :  exocyclic double bond at n-atom
  2036. %           n or nS    :  exocyclic single bond at n-atom
  2037. %           nA         :  alpha single bond at n-atom
  2038. %           nB         :  beta single bond at n-atom
  2039. %
  2040. %       e.g. 
  2041. %        
  2042. %        \nonaheteroh{1==N}{1==Cl;2==F}
  2043. %        \nonaheteroh[c]{1==N}{1==Cl;4==F;2==CH$_{3}$}
  2044. %
  2045. \def\nonaheteroh{\@ifnextchar[{\@nonaheteroh}{\@nonaheteroh[r]}}
  2046. \def\@nonaheteroh[#1]#2#3{%
  2047. %%%%%%%%%%%%%%%%%%%%%%%%%%
  2048. % treatment of atom list %
  2049. %%%%%%%%%%%%%%%%%%%%%%%%%%
  2050. \iniflag\iniatom%
  2051. \@forsemicol\member:=#2\do{%
  2052. \expandafter\@m@mb@r\member;\relax%
  2053. \expandafter\twoch@r\@membera{}%
  2054. \ifcase\@tmpa%
  2055.  \or \xdef\ddd{\@memberb}%1
  2056.  \or \xdef\ccc{\@memberb}%2
  2057.  \or%
  2058.    \if\@tmpb a%
  2059.      \xdef\jjj{\@memberb}%3a
  2060.    \else\ifx\@tmpb\empty%
  2061.      \xdef\bbb{\@memberb}%3
  2062.    \fi\fi
  2063.  \or \xdef\hhh{\@memberb}%4
  2064.  \or \xdef\ggg{\@memberb}%5
  2065.  \or \xdef\fff{\@memberb}%6
  2066.  \or% 
  2067.    \if\@tmpb a%
  2068.      \xdef\iii{\@memberb}%7a
  2069.    \else\ifx\@tmpb\empty%
  2070.      \xdef\eee{\@memberb}%7
  2071.    \fi\fi
  2072. \or \xdef\jjj{\@memberb}%8 (= 3a)
  2073. \or \xdef\iii{\@memberb}%9 (= 7a)
  2074. \fi}%
  2075.  \begin{picture}(1200,1200)(-400,-800)%
  2076.   \iforigpt \put(-\shiftii,-\shiftiii){\circle*{50}}%
  2077.            \put(-\noshift,-\noshift){\circle{50}}% 
  2078.    \typeout{command `nonahetero' origin: %
  2079.     (\the\noshift,\the\noshift) ---> (\the\shiftii,\the\shiftiii)}\fi%
  2080. %%%%%%%%%%%%%%%%%%
  2081. % outer skeleton %
  2082. %%%%%%%%%%%%%%%%%%
  2083. {\let\fff=\jjj \let\eee=\iii%
  2084.  \put(0,0){\hskbondb}% bond between 2 and 3  3 and 2
  2085.  \put(0,0){\hskbondc}% bond between 1 and 2  4 and 3
  2086.  \put(0,0){\hskbondd}% bond between 7a and 3a  4 and 4a
  2087.  \put(0,0){\hskbonde}% bond between 1 and 7a  4a and 8a
  2088.  \put(0,0){\hskbondvert}% bond between 3 and 3a
  2089. }%
  2090. {\let\aaa=\hhh \let\ddd=\eee\let\eee=\fff\let\fff=\ggg
  2091.  \let\ccc=\iii\let\bbb=\jjj%
  2092.  \put(0,-342){\hskbonda}% bond between 4 and 3a 8 and 8a
  2093.  \put(0,-342){\hskbondc}% bond between 7 and 7a 5 and 4a
  2094.  \put(0,-342){\hskbondf}% bond between 4 and 5 8 and 7
  2095.  \put(0,-342){\hskbondd}% bond between 7 and 6 5 and 6
  2096.  \put(0,-342){\hskbonde}% bond between 5 and 6 6 and 7
  2097. }%
  2098. %%%%%%%%%%%%%%%%%%%%%
  2099. % inner double bond %
  2100. %%%%%%%%%%%%%%%%%%%%%
  2101. \@tfor\member:=#1\do{%
  2102. \if\member r\relax%
  2103. {\let\aaa=\hhh \let\ddd=\eee\let\eee=\fff\let\fff=\ggg%
  2104.  \let\ccc=\iii\let\bbb=\jjj%
  2105.  \put(0,-342){\hbondb}% bond between 3a and 7a
  2106.  \put(0,-342){\hbondf}% bond between 4 and 5
  2107.  \put(0,-342){\hbondd}% bond between 6 and 7
  2108. }%
  2109. \else \if\member l\relax%
  2110. \else \if\member a\relax%
  2111.  \put(0,0){\hbondc}% bond between 3 and 4
  2112. \else \if\member b\relax%
  2113.  \put(0,0){\hbondb}% bond between 2 and 3
  2114. \else \if\member c\relax%
  2115.  \put(0,0){\hbondvert}% bond between 3 and 3a
  2116. \else \if\member d\relax%
  2117. {\let\aaa=\hhh \let\bbb=\jjj%
  2118.  \put(0,-342){\hbonda}% bond between 4 and 3a
  2119. }%
  2120. \else \if\member e\relax%
  2121. {\let\aaa=\hhh \let\fff=\ggg%
  2122.  \put(0,-342){\hbondf}% bond between 4 and 5
  2123. }%
  2124. \else \if\member f\relax%
  2125. {\let\eee=\fff \let\fff=\ggg%
  2126.  \put(0,-342){\hbonde}% bond between 5 and 6
  2127. }%
  2128. \else \if\member g\relax%
  2129. {\let\ddd=\eee \let\eee=\fff%
  2130.  \put(0,-342){\hbondd}% bond between 6 and 7
  2131. }%
  2132. \else \if\member h\relax%
  2133. {\let\ccc=\iii \let\ddd=\eee%
  2134.  \put(0,-342){\hbondc}% bond between 7 and 7a
  2135. }%
  2136. \else \if\member i\relax%
  2137. {\let\eee=\iii%
  2138.  \put(0,0){\hbondd}% bond between 1 and 7a
  2139. }%
  2140. \else \if\member j\relax%
  2141. {\let\ccc=\iii\let\bbb=\jjj%
  2142.  \put(0,-342){\hbondb}% bond between 7a and 3a
  2143. }%
  2144. \else \if\member B%left aromatic circle 
  2145.   \put(233,0){\circle{180}}%               %circle (five-membered)
  2146. \else \if\member A%left aromatic circle 
  2147.   \put(203,-342){\circle{240}}%            %circle (six-membered)
  2148. \else \expandafter\twoch@@r\member{}{}%
  2149.   \def\aax{3a} \def\aay{7a}%
  2150.       \if\@@tmpa 1\relax%
  2151.         \putratom{272}{-18}{\@@tmpb}%      % right type
  2152.       \else\if\@@tmpa 2\relax%
  2153.         \putratom{233}{60}{\@@tmpb}%       % right type
  2154.       \else\if\@@tmpa 3\relax%
  2155.         \putratom{120}{60}{\@@tmpb}%       % right type
  2156.       \else\if\@@tmpa 4\relax%
  2157.         \putratom{68}{-360}{\@@tmpb}%      % right type
  2158.       \else\if\@@tmpa 5\relax%
  2159.         \putratom{120}{-452}{\@@tmpb}%     % right type
  2160.       \else\if\@@tmpa 6\relax%
  2161.         \putratom{233}{-452}{\@@tmpb}%     % right type
  2162.       \else\if\@@tmpa 7\relax%
  2163.         \putratom{272}{-360}{\@@tmpb}%     % right type
  2164.       \else\if\@@tmpa 8\relax%
  2165.         \putratom{120}{-110}{\@@tmpb}%     % right type
  2166.       \else\ifx\@@tmpa\aax\relax%
  2167.         \putratom{120}{-110}{\@@tmpb}%     % right type
  2168.       \else\ifx\@@tmpa\aay\relax%
  2169.         \putratom{233}{-110}{\@@tmpb}%     % right type
  2170.       \else\if\@@tmpa 9\relax%
  2171.         \putratom{233}{-110}{\@@tmpb}%     % right type
  2172.       \else\if\@@tmpa 0\relax%
  2173.         \putratom{196}{-30}{\@@tmpb}%      % right type
  2174.       \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
  2175. \fi\fi\fi\fi\fi\fi\fi\fi%
  2176. \fi\fi\fi\fi\fi\fi}%
  2177. %%%%%%%%%%%%%%%%%%%%%%%%
  2178. % setting hetero atoms %
  2179. %%%%%%%%%%%%%%%%%%%%%%%%
  2180. % hetero atom on 1
  2181. \ifx\ddd\empty\else%
  2182.    \@cliptrue%
  2183.    \putratom{356}{-36}{\ddd}%     % right type
  2184. %   \putratom{346}{-36}{\ddd}%     % right type
  2185. \fi%
  2186. % hetero atom on 2
  2187. \ifx\ccc\empty\else%
  2188.      \@ccliptrue%
  2189.      \putratom{273}{141}{\ccc}%   % right type
  2190. \fi%
  2191. % hetero atom on 3
  2192. \ifx\bbb\empty\else%
  2193.      \@bcliptrue%
  2194.      \putlatom{135}{141}{\bbb}%   % left type
  2195. \fi%
  2196. % hetero atom on 3a
  2197. {\let\fff=\jjj%
  2198. \ifx\fff\empty\else%
  2199.      \global\@jcliptrue
  2200.      \putlatom{135}{-211}{\jjj}%  % left type
  2201. \fi}%
  2202. % hetero atom on 4
  2203. {\let\aaa=\hhh%
  2204. \ifx\aaa\empty\else%
  2205.      \global\@hcliptrue%
  2206.      \putlatom{50}{-378}{\hhh}%   % left type
  2207. %     \putlatom{60}{-378}{\hhh}%   % left type
  2208. \fi}%
  2209. % hetero atom on 5
  2210. {\let\fff=\ggg%
  2211. \ifx\fff\empty\else%
  2212.      \global\@gcliptrue%
  2213.      \putlatom{135}{-553}{\ggg}%  % left type
  2214. \fi}%
  2215. % hetero atom on 6
  2216. {\let\eee=\fff%
  2217. \ifx\eee\empty\else%
  2218.      \global\@fcliptrue%
  2219.      \putratom{273}{-553}{\fff}%  % left type
  2220. \fi}%
  2221. % hetero atom on 7
  2222. {\let\ddd=\eee%
  2223. \ifx\ddd\empty\else%
  2224.    \global\@ecliptrue%
  2225.    \putratom{356}{-378}{\eee}%    % right type
  2226. %   \putratom{346}{-378}{\eee}%    % right type
  2227. \fi}%
  2228. % hetero atom on 7a
  2229. {\let\eee=\iii%
  2230. \ifx\eee\empty\else%
  2231.      \global\@icliptrue%
  2232.      \putratom{273}{-211}{\iii}%  % left type
  2233. \fi}%
  2234. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2235. % setting substituents and exocyclic bonds %
  2236. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2237. \put(0,0){\setsixringh{#3}{5}{1}{5}{-1}}%  %substituents on 1 to 3
  2238. {\@clipfalse \if@eclip \@cliptrue \fi%     %substituents on 5 to 7
  2239.  \@eclipfalse \if@fclip \@ecliptrue \fi%
  2240.  \@fclipfalse \if@gclip \@fcliptrue \fi%
  2241. \put(0,-342){\setsixringh{#3}{11}{3}{7}{-1}}%
  2242. }%
  2243. {\@aclipfalse \if@hclip \@acliptrue \fi%   %substituent on 4
  2244. \put(0,-342){\setsixringh{#3}{-3}{0}{2}{0}}%
  2245. }%
  2246. {\@clipfusefalse \if@iclip \@clipfusetrue \fi%
  2247.  \put(303,-171){\setatombond{#3}{-8}{4}}%   %9 for 7a position
  2248. }%
  2249. {\@clipfusefalse \if@jclip \@clipfusetrue \fi%
  2250.   \put(103,-171){\setatombond{#3}{-7}{10}}% %8 for 3a position
  2251. }%
  2252. \end{picture}\iniatom\iniflag}%        %end of \nonaheteroh macro
  2253. %
  2254. % ************************************
  2255. % * nonahetero derivatives           *
  2256. % *  (horizontal type, inverse type) *
  2257. % ************************************
  2258. % The following numbering is adopted in this macro. 
  2259. %
  2260. %
  2261. %           2   3
  2262. %
  2263. %        1       
  2264. %
  2265. %       (9)7a   3a(8)
  2266. %
  2267. %       7          4
  2268. %
  2269. %           6   5
  2270. %   ____                     ____
  2271. %  |cf.                          |
  2272. %  |        7 (9) 1              |
  2273. %  |        *  7a *              |
  2274. %  |   6  *   * *   *  2         |
  2275. %  |     |     |     |           |
  2276. %  |     |     |     |           |
  2277. %  |   5  *   * -----  3         |
  2278. %  |        *  3a                |
  2279. %  |        4 (8)                |
  2280. %  |        ^                    |
  2281. %  |        |                    |
  2282. %  |        the original point   |
  2283. %  |____                     ____|
  2284. %
  2285. %   \nonaheterohi[BONDLIST]{ATOMLIST}{SUBSLIST}
  2286. %  
  2287. %     BONDLIST:  list of bonds 
  2288. %
  2289. %           none or r  :  aromatic six-membered ring
  2290. %           H or []    :  fully saturated form
  2291. %           a    :  1,2-double bond      b    :  2,3-double bond
  2292. %           c    :  3,3a-double bond     d    :  4,3a-double bond
  2293. %           e    :  4,5-double bond      f    :  5,6-double bond
  2294. %           g    :  6,7-double bond      h    :  7,7a-double bond
  2295. %           i    :  1,7a-double bond     j    :  3a,4a-double bond
  2296. %           A    :  aromatic circle (six-membered)
  2297. %           B    :  aromatic circle (five-membered)
  2298. %           {n+} :  plus at the n-nitrogen atom (n = 1 to 7)
  2299. %           {0+} :  plus (or others) at the center 
  2300. %                    of the five-membered cycle
  2301. %
  2302. %     ATOMLIST: list of heteroatoms (max 9 atoms)
  2303. %
  2304. %       for n = 1 to 7
  2305. %
  2306. %            n         : Hetero atom, e.g. N, O, etc. at n-position
  2307. %                        e.g. 1==N for N at 1-position
  2308. %            na        : Hetero atom at 3a or 7b (n=3 or 7)
  2309. %                        e.g. 3a==N (or 8==N) for N at 4a-position
  2310. %                             7a==N (or 9==N) for N at 8a-position
  2311. %
  2312. %     SUBSLIST: list of substituents (max 7 substitution positions)
  2313. %
  2314. %       for n = 1 to 8
  2315. %
  2316. %           nD         :  exocyclic double bond at n-atom
  2317. %           n or nS    :  exocyclic single bond at n-atom
  2318. %           nA         :  alpha single bond at n-atom
  2319. %           nB         :  beta single bond at n-atom
  2320. %           nSA        :  alpha single bond at n-atom (boldface)
  2321. %           nSB        :  beta single bond at n-atom (dotted line)
  2322. %           nSa        :  alpha (not specified) single bond at n-atom
  2323. %           nSb        :  beta (not specified) single bond at n-atom
  2324. %
  2325. %       for 8 (3a position) and 9 (7a position)
  2326. %
  2327. %           nD         :  exocyclic double bond at n-atom
  2328. %           n or nS    :  exocyclic single bond at n-atom
  2329. %           nA         :  alpha single bond at n-atom
  2330. %           nB         :  beta single bond at n-atom
  2331. %
  2332. %       e.g. 
  2333. %        
  2334. %        \nonaheterohi{1==N}{1==Cl;2==F}
  2335. %        \nonaheterohi[c]{1==N}{1==Cl;4==F;2==CH$_{3}$}
  2336. %
  2337. \def\nonaheterohi{\@ifnextchar[{\@nonaheterohi}{\@nonaheterohi[r]}}%
  2338. \def\@nonaheterohi[#1]#2#3{%
  2339. %%%%%%%%%%%%%%%%%%%%%%%%%%
  2340. % treatment of atom list %
  2341. %%%%%%%%%%%%%%%%%%%%%%%%%%
  2342. \iniflag\iniatom%initialize
  2343. \@forsemicol\member:=#2\do{%
  2344. \expandafter\@m@mb@r\member;\relax%
  2345. \expandafter\twoch@r\@membera{}%
  2346. \ifcase\@tmpa%
  2347.  \or \xdef\aaa{\@memberb}%1
  2348.  \or \xdef\bbb{\@memberb}%2
  2349.  \or%
  2350.    \if\@tmpb a%
  2351.      \xdef\iii{\@memberb}%3a
  2352.    \else\ifx\@tmpb\empty%
  2353.      \xdef\ccc{\@memberb}%3
  2354.    \fi\fi
  2355.  \or \xdef\eee{\@memberb}%4
  2356.  \or \xdef\fff{\@memberb}%5
  2357.  \or \xdef\ggg{\@memberb}%6
  2358.  \or% 
  2359.    \if\@tmpb a%
  2360.      \xdef\jjj{\@memberb}%7a
  2361.    \else\ifx\@tmpb\empty%
  2362.      \xdef\hhh{\@memberb}%7
  2363.    \fi\fi
  2364. \or \xdef\iii{\@memberb}%8 (= 3a)
  2365. \or \xdef\jjj{\@memberb}%9 (= 7a)
  2366. \fi}%
  2367.  \begin{picture}(1200,1200)(-400,-800)%
  2368.   \iforigpt \put(-\shiftii,-\shiftiii){\circle*{50}}%
  2369.            \put(-\noshift,-\noshift){\circle{50}}% 
  2370.    \typeout{command `nonaheterohi' origin: %
  2371.     (\the\noshift,\the\noshift) ---> (\the\shiftii,\the\shiftiii)}\fi%
  2372. %%%%%%%%%%%%%%%%%%
  2373. % outer skeleton %
  2374. %%%%%%%%%%%%%%%%%%
  2375. {\let\fff=\jjj \let\eee=\iii%
  2376.  \put(0,0){\hskbonda}% bond between 1 and 2
  2377.  \put(0,0){\hskbondb}% bond between 2 and 3
  2378.  \put(0,0){\hskbonde}% bond between 7a and 3a
  2379.  \put(0,0){\hskbondf}% bond between 1 and 7a
  2380.  \put(0,0){\hskbondverti}% bond between 3 and 3a
  2381. }%
  2382. {\let\aaa=\hhh \let\ddd=\eee\let\eee=\fff\let\fff=\ggg%
  2383.  \let\ccc=\iii\let\bbb=\jjj%
  2384.  \put(0,-342){\hskbonda}% bond between 7 and 7a
  2385.  \put(0,-342){\hskbondc}% bond between 4 and 3a
  2386.  \put(0,-342){\hskbondf}% bond between 6 and 7
  2387.  \put(0,-342){\hskbondd}% bond between 4 and 5 
  2388.  \put(0,-342){\hskbonde}% bond between 5 and 6 
  2389. }%
  2390. %%%%%%%%%%%%%%%%%%%%%
  2391. % inner double bond %
  2392. %%%%%%%%%%%%%%%%%%%%%
  2393. \@tfor\member:=#1\do{%
  2394. \if\member r\relax%
  2395. {\let\aaa=\hhh \let\ddd=\eee\let\eee=\fff\let\fff=\ggg%
  2396.  \let\ccc=\iii\let\bbb=\jjj%
  2397.  \put(0,-342){\hbondb}% bond between 3a and 7a
  2398.  \put(0,-342){\hbondf}% bond between 6 and 7
  2399.  \put(0,-342){\hbondd}% bond between 4 and 5
  2400. }%
  2401. \else \if\member l\relax%
  2402. \else \if\member a\relax%
  2403.  \put(0,0){\hbonda}% bond between 1 and 2
  2404. \else \if\member b\relax%
  2405.  \put(0,0){\hbondb}% bond between 2 and 3
  2406. \else \if\member c\relax%
  2407.  \put(0,0){\hbondverti}% bond between 3 and 3a
  2408. \else \if\member d\relax%
  2409. {\let\ccc=\iii \let\ddd=\eee%
  2410.  \put(0,-342){\hbondc}% bond between 4 and 3a
  2411. }%
  2412. \else \if\member e\relax%
  2413. {\let\ddd=\eee\let\eee=\fff%
  2414.  \put(0,-342){\hbondd}% bond between 4 and 5
  2415. }%
  2416. \else \if\member f\relax%
  2417. {\let\eee=\fff \let\fff=\ggg%
  2418.  \put(0,-342){\hbonde}% bond between 5 and 6
  2419. }%
  2420. \else \if\member g\relax%
  2421. {\let\aaa=\hhh \let\fff=\ggg%
  2422.  \put(0,-342){\hbondf}% bond between 7 and 6
  2423. }%
  2424. \else \if\member h\relax%
  2425. {\let\aaa=\hhh \let\bbb=\jjj%
  2426.  \put(0,-342){\hbonda}% bond between 7 and 7a
  2427. }%
  2428. \else \if\member i\relax%
  2429. {\let\fff=\jjj%
  2430.  \put(0,0){\hbondf}% bond between 1 and 7a
  2431. }%
  2432. \else \if\member j\relax%
  2433. {\let\ccc=\iii\let\bbb=\jjj%
  2434.  \put(0,-342){\hbondb}% bond between 7a and 3a
  2435. }%
  2436. \else \if\member B%aromatic circle 
  2437.   \put(173,0){\circle{180}}%               %circle (five-membered)
  2438. \else \if\member A%aromatic circle 
  2439.   \put(203,-342){\circle{240}}%            %circle (six-membered)
  2440. \else \expandafter\twoch@@r\member{}{}%
  2441.   \def\aax{7a} \def\aay{3a}%
  2442.       \if\@@tmpa 1\relax%
  2443.         \putratom{68}{-18}{\@@tmpb}%       % right type
  2444.       \else\if\@@tmpa 3\relax%
  2445.         \putratom{233}{60}{\@@tmpb}%       % right type
  2446.       \else\if\@@tmpa 2\relax%
  2447.         \putratom{120}{60}{\@@tmpb}%       % right type
  2448.       \else\if\@@tmpa 7\relax%
  2449.         \putratom{68}{-360}{\@@tmpb}%      % right type
  2450.       \else\if\@@tmpa 6\relax%
  2451.         \putratom{120}{-452}{\@@tmpb}%     % right type
  2452.       \else\if\@@tmpa 5\relax%
  2453.         \putratom{233}{-452}{\@@tmpb}%     % right type
  2454.       \else\if\@@tmpa 4\relax%
  2455.         \putratom{272}{-360}{\@@tmpb}%     % right type
  2456.       \else\if\@@tmpa 9\relax%
  2457.         \putratom{120}{-110}{\@@tmpb}%     % right type
  2458.       \else\ifx\@@tmpa\aax\relax%
  2459.         \putratom{120}{-110}{\@@tmpb}%     % right type
  2460.       \else\ifx\@@tmpa\aay\relax%
  2461.         \putratom{233}{-110}{\@@tmpb}%     % right type
  2462.       \else\if\@@tmpa 8\relax%
  2463.         \putratom{233}{-110}{\@@tmpb}%     % right type
  2464.       \else\if\@@tmpa 0\relax%
  2465.         \putratom{140}{-30}{\@@tmpb}%      % right type
  2466.       \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi%
  2467. \fi\fi\fi\fi\fi\fi\fi\fi%
  2468. \fi\fi\fi\fi\fi\fi}%
  2469. %%%%%%%%%%%%%%%%%%%%%%%%
  2470. % setting hetero atoms %
  2471. %%%%%%%%%%%%%%%%%%%%%%%%
  2472. % hetero atom on 1
  2473. \ifx\aaa\empty\else%
  2474.      \@acliptrue%
  2475.      \putlatom{50}{-36}{\aaa}%     % left type
  2476. %     \putlatom{60}{-36}{\aaa}%     % left type
  2477. \fi%
  2478. % hetero atom on 3
  2479. \ifx\ccc\empty\else%
  2480.      \@ccliptrue%
  2481.      \putratom{273}{141}{\ccc}%    % right type
  2482. \fi%
  2483. % hetero atom on 2
  2484. \ifx\bbb\empty\else%
  2485.      \@bcliptrue%
  2486.      \putlatom{135}{141}{\bbb}%    % left type
  2487. \fi%
  2488. % hetero atom on 7a
  2489. {\let\fff=\jjj%
  2490. \ifx\fff\empty\else%
  2491.      \global\@jcliptrue%
  2492.      \putlatom{135}{-211}{\jjj}%   % left type
  2493. \fi}%
  2494. % hetero atom on 7
  2495. {\let\aaa=\hhh%
  2496. \ifx\aaa\empty\else%
  2497.      \global\@hcliptrue%
  2498.      \putlatom{50}{-378}{\hhh}%    % left type
  2499. %     \putlatom{60}{-378}{\hhh}%    % left type
  2500. \fi}%
  2501. % hetero atom on 6
  2502. {\let\fff=\ggg%
  2503. \ifx\fff\empty\else%
  2504.      \global\@gcliptrue%
  2505.      \putlatom{135}{-553}{\ggg}%   % left type
  2506. \fi}%
  2507. % hetero atom on 5
  2508. {\let\eee=\fff%
  2509. \ifx\eee\empty\else%
  2510.      \global\@fcliptrue%
  2511.      \putratom{273}{-553}{\fff}%   % left type
  2512. \fi}%
  2513. % hetero atom on 4
  2514. {\let\ddd=\eee%
  2515. \ifx\ddd\empty\else%
  2516.    \global\@ecliptrue%
  2517.    \putratom{356}{-378}{\eee}%     % right type
  2518. %   \putratom{346}{-378}{\eee}%     % right type
  2519. \fi}%
  2520. % hetero atom on 3a
  2521. {\let\eee=\iii%
  2522. \ifx\eee\empty\else%
  2523.      \global\@icliptrue%
  2524.      \putratom{273}{-211}{\iii}%   % right type
  2525. \fi}%
  2526. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2527. % setting substituents and exocyclic bonds %
  2528. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2529. \put(0,0){\setsixringh{#3}{0}{0}{4}{0}}%   %substituents on 1 to 3
  2530. {\@clipfalse \if@eclip \@cliptrue \fi%     %substituents on 4 to 6
  2531.  \@eclipfalse \if@fclip \@ecliptrue \fi%
  2532.  \@fclipfalse \if@gclip \@fcliptrue \fi%
  2533. \put(0,-342){\setsixringh{#3}{0}{3}{7}{0}}%
  2534. }%
  2535. {\@aclipfalse \if@hclip \@acliptrue \fi%   %substituent on 7
  2536. \put(0,-342){\setsixringh{#3}{-6}{0}{2}{0}}%
  2537. }%
  2538. {\@clipfusefalse \if@iclip \@clipfusetrue \fi%
  2539.  \put(303,-171){\setatombond{#3}{-7}{4}}%  %8 for 3a position
  2540. }%
  2541. {\@clipfusefalse \if@jclip \@clipfusetrue \fi%
  2542.   \put(103,-171){\setatombond{#3}{-8}{10}}%%9 for 7a position
  2543. }%
  2544. \end{picture}\iniatom\iniflag}%      %end of \nonaheterohi macro
  2545. %
  2546. % **********************************************************
  2547. % * heterocycles having fused six- and five-membered rings *
  2548. % *  (horizontal type)                                     *
  2549. % **********************************************************
  2550. %
  2551. %   N-heterocycles:
  2552. %
  2553. %   \indoleh[BONDLIST]{SUBSLIST}
  2554. %   \indolehi[BONDLIST]{SUBSLIST}
  2555. %
  2556. %   \isoindoleh[BONDLIST]{SUBSLIST}
  2557. %   \isoindolehi[BONDLIST]{SUBSLIST}
  2558. %
  2559. %   \indolizineh[BONDLIST]{SUBSLIST}
  2560. %   \indolizinehi[BONDLIST]{SUBSLIST}
  2561. %          (different from the IUPAC numbering)
  2562. %
  2563. %   \purineh[BONDLIST]{SUBSLIST}
  2564. %   \purinehi[BONDLIST]{SUBSLIST}
  2565. %          (different from the IUPAC numbering)
  2566. %
  2567. %   O-heterocycles:
  2568. %
  2569. %   \benzofuraneh[BONDLIST]{SUBSLIST}
  2570. %   \benzofuranehi[BONDLIST]{SUBSLIST}
  2571. %
  2572. %   \isobenzofuranehi[BONDLIST]{SUBSLIST}
  2573. %
  2574. %   \benzoxazoleh[BONDLIST]{SUBSLIST}
  2575. %   \benzoxazolehi[BONDLIST]{SUBSLIST}
  2576. %
  2577. %     BONDLIST:  list of bonds 
  2578. %
  2579. %           none or r  :  aromatic six-membered ring
  2580. %           H or []    :  fully saturated form
  2581. %           a    :  1,2-double bond      b    :  2,3-double bond
  2582. %           c    :  3,3a-double bond     d    :  4,3a-double bond
  2583. %           e    :  4,5-double bond      f    :  5,6-double bond
  2584. %           g    :  6,7-double bond      h    :  7,7a-double bond
  2585. %           i    :  1,7a-double bond     j    :  3a,4a-double bond
  2586. %           A    :  aromatic circle
  2587. %           {n+}       :  plus at the n-nitrogen atom (n = 1 to 7)
  2588. %
  2589. %     SUBSLIST: list of substituents (max 7 substitution positions)
  2590. %
  2591. %       for n = 1 to 8
  2592. %
  2593. %           nD         :  exocyclic double bond at n-atom
  2594. %           n or nS    :  exocyclic single bond at n-atom
  2595. %           nA         :  alpha single bond at n-atom
  2596. %           nB         :  beta single bond at n-atom
  2597. %           nSA        :  alpha single bond at n-atom (boldface)
  2598. %           nSB        :  beta single bond at n-atom (dotted line)
  2599. %           nSa        :  alpha (not specified) single bond at n-atom
  2600. %           nSb        :  beta (not specified) single bond at n-atom
  2601. %
  2602. %       for 8 (3a position) and 9 (7a position)
  2603. %
  2604. %           nD         :  exocyclic double bond at n-atom
  2605. %           n or nS    :  exocyclic single bond at n-atom
  2606. %           nA         :  alpha single bond at n-atom
  2607. %           nB         :  beta single bond at n-atom
  2608. %
  2609. %       e.g. 
  2610. %        
  2611. %        \indoleh{1==N}{1==Cl;2==F}
  2612. %        \indoleh[c]{1==N}{1==Cl;4==F;2==CH$_{3}$}
  2613. %
  2614. \def\purineh{\@ifnextchar[{\@purineh}{\@purineh[ra]}}%
  2615. \def\@purineh[#1]#2{%
  2616. \iforigpt \typeout{command `purineh' is based on `nonaheteroh'.}\fi%
  2617. \nonaheteroh[#1]{1==N;3==N;5==N;7==N}{#2}}%
  2618. \def\purinehi{\@ifnextchar[{\@purinehi}{\@purinehi[ra]}}%
  2619. \def\@purinehi[#1]#2{%
  2620. \iforigpt \typeout{command `purinehi' is based on `nonaheterohi'.}\fi%
  2621. \nonaheterohi[#1]{1==N;3==N;5==N;7==N}{#2}}%
  2622. %
  2623. \def\indoleh{\@ifnextchar[{\@indoleh}{\@indoleh[rb]}}%
  2624. \def\@indoleh[#1]#2{%
  2625. \iforigpt \typeout{command `indoleh' is based on `nonaheteroh'.}\fi%
  2626. \nonaheteroh[#1]{1==N}{#2}}%
  2627. \def\indolehi{\@ifnextchar[{\@indolehi}{\@indolehi[rb]}}%
  2628. \def\@indolehi[#1]#2{%
  2629. \iforigpt \typeout{command `indolehi' is based on `nonaheterohi'.}\fi%
  2630. \nonaheterohi[#1]{1==N}{#2}}%
  2631. %
  2632. \def\indolizineh{\@ifnextchar[{\@indolizineh}{\@indolizineh[aceg]}}%
  2633. \def\@indolizineh[#1]#2{%
  2634. \iforigpt \typeout{command `indolizineh' is based on `nonaheteroh'.}\fi%
  2635. \nonaheteroh[#1]{7a==N}{#2}}%
  2636. \def\indolizinehi{\@ifnextchar[{\@indolizinehi}{\@indolizinehi[aceg]}}%
  2637. \def\@indolizinehi[#1]#2{%
  2638. \iforigpt \typeout{command `indolizinehi' is based on `nonaheterohi'.}\fi%
  2639. \nonaheterohi[#1]{7a==N}{#2}}%
  2640. %
  2641. \def\isoindoleh{\@ifnextchar[{\@isoindoleh}{\@isoindoleh[cegi]}}%
  2642. \def\@isoindoleh[#1]#2{%
  2643. \iforigpt \typeout{command `isoindoleh' is based on `nonaheteroh'.}\fi%
  2644. \nonaheteroh[#1]{2==N}{#2}}%
  2645. \def\isoindolehi{\@ifnextchar[{\@isoindolehi}{\@isoindolehi[cegi]}}%
  2646. \def\@isoindolehi[#1]#2{%
  2647. \iforigpt \typeout{command `isoindolehi' is based on `nonaheterohi'.}\fi%
  2648. \nonaheterohi[#1]{2==N}{#2}}%
  2649. %
  2650. \def\benzofuraneh{\@ifnextchar[{\@benzofuraneh}{\@benzofuraneh[rb]}}%
  2651. \def\@benzofuraneh[#1]#2{%
  2652. \iforigpt \typeout{command `benzofuraneh' is based on `nonaheteroh'.}\fi%
  2653. \nonaheteroh[#1]{1==O}{#2}}%
  2654. \def\benzofuranehi{\@ifnextchar[{\@benzofuranehi}{\@benzofuranehi[rb]}}%
  2655. \def\@benzofuranehi[#1]#2{%
  2656. \iforigpt \typeout{command `benzofuranehi' is based on `nonaheterohi'.}\fi%
  2657. \nonaheterohi[#1]{1==O}{#2}}%
  2658. %
  2659. \def\isobenzofuraneh{\@ifnextchar[{\@isobenzofuraneh}%
  2660.  {\@isobenzofuraneh[cegi]}}%
  2661. \def\@isobenzofuraneh[#1]#2{%
  2662. \iforigpt \typeout{command `isobenzofuraneh' is based on `nonaheteroh'.}\fi%
  2663. \nonaheteroh[#1]{2==O}{#2}}%
  2664. \def\isobenzofuranehi{\@ifnextchar[{\@isobenzofuranehi}%
  2665.  {\@isobenzofuranehi[cegi]}}%
  2666. \def\@isobenzofuranehi[#1]#2{%
  2667. \iforigpt \typeout{command `isobenzofuranehi' is based on `nonaheterohi'.}\fi%
  2668. \nonaheterohi[#1]{2==O}{#2}}%
  2669. %
  2670. \def\benzoxazoleh{\@ifnextchar[{\@benzoxazoleh}{\@benzoxazoleh[rb]}}%
  2671. \def\@benzoxazoleh[#1]#2{%
  2672. \iforigpt \typeout{command `benzoxazoleh' is based on `nonaheteroh'.}\fi%
  2673. \nonaheteroh[#1]{1==O;3==N}{#2}}%
  2674. \def\benzoxazolehi{\@ifnextchar[{\@benzoxazolehi}{\@benzoxazolehi[rb]}}%
  2675. \def\@benzoxazolehi[#1]#2{%
  2676. \iforigpt \typeout{command `benzoxazolehi' is based on `nonaheterohi'.}\fi%
  2677. \nonaheterohi[#1]{1==O;3==N}{#2}}%
  2678. %
  2679. % **********************
  2680. % * six-membered unit  *
  2681. % *  (horizontal type) *
  2682. % **********************
  2683. % This macro is a six-membered fragment that can be fused to another 
  2684. % ring structure to produce a new ring system. The following 
  2685. % numbering is adopted in this macro. 
  2686. %
  2687. %                                   b
  2688. %                                2      3  
  2689. %                            a    -----    c
  2690. %                               *       *
  2691. %   the original point ===> 1 *           * 4
  2692. %          (0,0)                *       *  d
  2693. %                            f    -----
  2694. %                                6      5 
  2695. %                                   e
  2696. %
  2697. %   \sixunith[BONDLIST]{ATOMLIST}{SUBSLIST}{OMIT}
  2698. %  
  2699. %     BONDLIST = 
  2700. %
  2701. %           none       :  fully saturated
  2702. %           a          :  1,2-double bond
  2703. %           b          :  2,3-double bond
  2704. %           c          :  4,3-double bond
  2705. %           d          :  4,5-double bond
  2706. %           e          :  5,6-double bond
  2707. %           f          :  6,1-double bond
  2708. %           {n+}       :  plus at the n-nitrogen atom (n = 1 to 4)
  2709. %
  2710. %     ATOMLIST: list of heteroatoms (max 6 atoms)
  2711. %
  2712. %       for n = 1 to 6
  2713. %
  2714. %           n          : Hetero atom, e.g. N, O, etc. at n-position, 
  2715. %                        e.g. 1==N for N at 1-position
  2716. %
  2717. %     SUBSLIST: list of substituents (max 6 substitution positions)
  2718. %
  2719. %       for n = 1 to 6 
  2720. %
  2721. %           nD         :  exocyclic double bond at n-atom
  2722. %           n or nS    :  exocyclic single bond at n-atom
  2723. %           nA         :  alpha single bond at n-atom
  2724. %           nB         :  beta single bond at n-atom
  2725. %           nSA        :  alpha single bond at n-atom (boldface)
  2726. %           nSB        :  beta single bond at n-atom (dotted line)
  2727. %           nSa        :  alpha (not specified) single bond at n-atom
  2728. %           nSb        :  beta (not specified) single bond at n-atom
  2729. %
  2730. %     OMIT:  one bond omitted (a, b, c, d, e, or f)
  2731. %
  2732. %       e.g. 
  2733. %        
  2734. %        \sixhunitv{1==N}{1==Cl;2==F}{e}
  2735. %
  2736. \def\sixunith{\@ifnextchar[{\@sixunith}{\@sixunith[r]}}
  2737. \def\@sixunith[#1]#2#3#4{%
  2738. %%%%%%%%%%%%%%%%%%%%%%%%%%
  2739. % treatment of atom list %
  2740. %%%%%%%%%%%%%%%%%%%%%%%%%%
  2741. \iniatom\iniflag%initialize%
  2742. \@forsemicol\member:=#2\do{%
  2743. \expandafter\@m@mb@r\member;\relax%
  2744. \expandafter\twoch@r\@membera{}%
  2745. \ifcase\@tmpa%
  2746.  \or \xdef\aaa{\@memberb}%
  2747.  \or \xdef\bbb{\@memberb}%
  2748.  \or \xdef\ccc{\@memberb}%
  2749.  \or \xdef\ddd{\@memberb}%
  2750.  \or \xdef\eee{\@memberb}%
  2751.  \or \xdef\fff{\@memberb}%
  2752. \fi}%
  2753.  \begin{picture}(800,880)(-240,-400)%
  2754.   \iforigpt \put(-\shifti,-\shiftii){\circle*{50}}%
  2755.            \put(-\noshift,-\noshift){\circle{50}}% 
  2756.    \typeout{command `sixunith' origin: %
  2757.     (\the\noshift,\the\noshift) ---> (\the\shifti,\the\shiftii)}\fi%
  2758. %%%%%%%%%%%%%%%%%%
  2759. % outer skeleton %
  2760. %%%%%%%%%%%%%%%%%%
  2761. % changed OMIT into a list 1993/11/21 by Shinsaku Fujita
  2762. {\resetbdsw%
  2763. \@tfor\memBer:=#4\do{%
  2764. \if\memBer a\relax\gdef\@aaa{}\fi%
  2765. \if\memBer b\relax\gdef\@bbb{}\fi%
  2766. \if\memBer c\relax\gdef\@ccc{}\fi%
  2767. \if\memBer d\relax\gdef\@ddd{}\fi%
  2768. \if\memBer e\relax\gdef\@eee{}\fi%
  2769. \if\memBer f\relax\gdef\@fff{}\fi%
  2770. }%
  2771. \if\@aaa a\relax\hskbonda\fi% bond between 1 and 2
  2772. \if\@bbb b\relax\hskbondb\fi% bond between 2 and 3
  2773. \if\@ccc c\relax\hskbondc\fi% bond between 3 and 4
  2774. \if\@ddd d\relax\hskbondd\fi% bond between 4 and 5
  2775. \if\@eee e\relax\hskbonde\fi% bond between 5 and 6
  2776. \if\@fff f\relax\hskbondf\fi% bond between 6 and 1
  2777. }%
  2778. %\ifx#4a\relax \else%
  2779. % \hskbonda% bond between 1 and 2
  2780. %\fi%
  2781. %\ifx#4f\relax \else%
  2782. % \hskbondf% bond between 1 and 6
  2783. %\fi%
  2784. %\ifx#4c\relax \else%
  2785. % \hskbondc% bond between 4 and 3
  2786. %\fi%
  2787. %\ifx#4d\relax \else%
  2788. % \hskbondd% bond between 4 and 5
  2789. %\fi%
  2790. %\ifx#4b\relax \else%
  2791. % \hskbondb% bond between 3 and 2
  2792. %\fi%
  2793. %\ifx#4e\relax \else%
  2794. % \hskbonde% bond between 5 and 6
  2795. %\fi%
  2796. %%%%%%%%%%%%%%%%%%%%%
  2797. % inner double bond %
  2798. %%%%%%%%%%%%%%%%%%%%%
  2799. \@tfor\member:=#1\do{%
  2800. \if\member r\relax%
  2801. \else \if\member l\relax%
  2802. \else \if\member a\relax%
  2803.  \ifx#4a\relax \else%
  2804.   \hbonda%
  2805.  \fi%
  2806. \else \if\member b\relax%
  2807.  \ifx#4b\relax \else%
  2808.    \hbondb%
  2809.  \fi%
  2810. \else \if\member c\relax%
  2811.  \ifx#4c\relax \else%
  2812.    \hbondc%
  2813.  \fi%
  2814. \else \if\member d\relax%
  2815.  \ifx#4d\relax \else%
  2816.    \hbondd%
  2817.  \fi%
  2818. \else \if\member e\relax%
  2819.  \ifx#4e\relax \else%
  2820.    \hbonde%
  2821.  \fi%
  2822. \else \if\member f\relax%
  2823.  \ifx#4f\relax \else%
  2824.    \hbondf%
  2825.  \fi%
  2826. \else \if\member A%left aromatic circle 
  2827.   \put(203,0){\circle{240}}%                %circle
  2828. \else \expandafter\twoch@@r\member{}{}%
  2829.       \if\@@tmpa 4\relax%
  2830.         \putratom{272}{-18}{\@@tmpb}%       % right type
  2831.       \else\if\@@tmpa 1\relax%
  2832.         \putratom{68}{-18}{\@@tmpb}%        % right type
  2833.       \else\if\@@tmpa 3\relax
  2834.         \putratom{233}{60}{\@@tmpb}%        % right type
  2835.       \else\if\@@tmpa 2\relax%
  2836.         \putratom{120}{60}{\@@tmpb}%        % right type
  2837.       \else\if\@@tmpa 5\relax%
  2838.         \putratom{233}{-110}{\@@tmpb}%      % right type
  2839.       \else\if\@@tmpa 6\relax%
  2840.         \putratom{120}{-110}{\@@tmpb}%      % right type
  2841.       \fi\fi\fi\fi\fi\fi%
  2842. \fi\fi\fi\fi\fi\fi\fi\fi\fi}%
  2843. %%%%%%%%%%%%%%%%%%%%%%%%
  2844. % setting hetero atoms %
  2845. %%%%%%%%%%%%%%%%%%%%%%%%
  2846. \ifx\ddd\empty\else%
  2847.    \@cliptrue%
  2848.    \putratom{346}{-36}{\ddd}%               % right type
  2849. \fi%
  2850. \ifx\aaa\empty\else%
  2851.      \@acliptrue%
  2852.      \putlatom{60}{-36}{\aaa}%              % left type
  2853. \fi%
  2854. \ifx\bbb\empty\else%
  2855.      \@bcliptrue%
  2856.      \putlatom{135}{141}{\bbb}%             % left type
  2857. \fi%
  2858. \ifx\ccc\empty\else%
  2859.      \@ccliptrue%
  2860.      \putratom{273}{141}{\ccc}%             % right type
  2861. \fi%
  2862. \ifx\fff\empty\else%
  2863.      \@fcliptrue%
  2864.      \putlatom{135}{-211}{\fff}%            % left type
  2865. \fi%
  2866. \ifx\eee\empty\else%
  2867.      \@ecliptrue%
  2868.      \putratom{273}{-211}{\eee}%            % right type
  2869. \fi%
  2870. \setsixringh{#3}{0}{0}{7}{0}%
  2871. \end{picture}\iniatom\iniflag}%     %end of \sixunith macro
  2872. %
  2873. % **********************
  2874. % * five-membered unit *
  2875. % *  (horizontal type) *
  2876. % **********************
  2877. % This macro is a five-membered fragment that can be fused to another 
  2878. % ring structure to produce a new ring system. The following 
  2879. % numbering is adopted in this macro. 
  2880. %
  2881. %     3  _____  2
  2882. %       |       *
  2883. %       |         * 1 <===== the original point
  2884. %       |       *
  2885. %     4  -----  5
  2886. %
  2887. %   \fiveunith[BONDLIST]{ATOMLIST}{SUBSLIST}{OMIT}
  2888. %  
  2889. %     BONDLIST: list of inner double bonds 
  2890. %
  2891. %           a          :  1,2-double bond
  2892. %           b          :  2,3-double bond
  2893. %           c          :  4,3-double bond
  2894. %           d          :  4,5-double bond
  2895. %           e          :  5,1-double bond
  2896. %           A          :  aromatic circle
  2897. %           {n+}       :  plus at the n-nitrogen atom (n = 1 to 4)
  2898. %           {0+}       :  plus (or others) at the center
  2899. %
  2900. %     ATOMLIST: list of heteroatoms (max 5 atoms)
  2901. %
  2902. %       for n = 1 to 5
  2903. %
  2904. %           n          : Hetero atom, e.g. N, O, etc. at n-position
  2905. %                        e.g. 1==N for N at 1-position
  2906. %
  2907. %     SUBSLIST: list of substituents (max 5 substitution positions)
  2908. %
  2909. %       for n = 1 to 5 
  2910. %
  2911. %           nD         :  exocyclic double bond at n-atom
  2912. %           n or nS    :  exocyclic single bond at n-atom
  2913. %           nA         :  alpha single bond at n-atom
  2914. %           nB         :  beta single bond at n-atom
  2915. %           nSA        :  alpha single bond at n-atom (boldface)
  2916. %           nSB        :  beta single bond at n-atom (dotted line)
  2917. %           nSa        :  alpha (not specified) single bond at n-atom
  2918. %           nSb        :  beta (not specified) single bond at n-atom
  2919. %
  2920. %     OMIT:  one bond omitted (a, b, c, d, e, or f)
  2921. %
  2922. %       e.g. 
  2923. %        
  2924. %        \fiveunith{1==N}{1==H;2==F}{a}
  2925. %
  2926. \def\fiveunith{\@ifnextchar[{\@fiveunith}{\@fiveunith[r]}}
  2927. \def\@fiveunith[#1]#2#3#4{%
  2928. \iniatom\iniflag%initialize
  2929. %\def\aaa{}\def\bbb{}\def\ccc{}\def\ddd{}\def\eee{}\def\fff{}%
  2930. \@forsemicol\member:=#2\do{%
  2931. \expandafter\@m@mb@r\member;\relax%
  2932. \expandafter\twoch@r\@membera{}%
  2933. \ifcase\@tmpa%
  2934.  \or \xdef\ddd{\@memberb}%
  2935.  \or \xdef\ccc{\@memberb}%
  2936.  \or \xdef\bbb{\@memberb}%
  2937.  \or \xdef\fff{\@memberb}%
  2938.  \or \xdef\eee{\@memberb}%
  2939. \fi}%
  2940.  \begin{picture}(800,880)(-240,-400)%
  2941.   \iforigpt \put(-\shifti,-\shiftii){\circle*{50}}%
  2942.            \put(-\noshift,-\noshift){\circle{50}}% 
  2943.    \typeout{command `fiveunith' origin: %
  2944.     (\the\noshift,\the\noshift) ---> (\the\shifti,\the\shiftii)}\fi%
  2945. %%%%%%%%%%%%%%%%%%
  2946. % outer skeleton %
  2947. %%%%%%%%%%%%%%%%%%
  2948. % changed OMIT to a list 1993/11/21 by Shinsaku Fujita
  2949. {\resetbdsw%
  2950. \@tfor\memBer:=#4\do{%
  2951. \if\memBer a\relax\gdef\@aaa{}\fi%
  2952. \if\memBer b\relax\gdef\@bbb{}\fi%
  2953. \if\memBer c\relax\gdef\@ccc{}\fi%
  2954. \if\memBer d\relax\gdef\@ddd{}\fi%
  2955. \if\memBer e\relax\gdef\@eee{}\fi%
  2956. %\if\memBer f\relax\gdef\@fff{}\fi%
  2957. }%
  2958. \if\@aaa a\relax\hskbondc\fi% bond between 1 and 2
  2959. \if\@bbb b\relax\hskbondb\fi% bond between 2 and 3
  2960. \if\@ccc c\relax\hskbondvert\fi% bond between 3 and 4
  2961. \if\@ddd d\relax\hskbonde\fi% bond between 4 and 5
  2962. \if\@eee e\relax\hskbondd\fi% bond between 5 and 6
  2963. %\if\@fff f\relax\hskbondf\fi% bond between 6 and 1
  2964. }%
  2965. % old
  2966. %\ifx#4a\relax\else%
  2967. % \hskbondc%bond between 1 and 2
  2968. %\fi%
  2969. %\ifx#4e\relax\else%
  2970. % \hskbondd%bond between 1 and 5
  2971. %\fi%
  2972. %\ifx#4b\relax\else%
  2973. %  \hskbondb%bond between 2 to 3
  2974. %\fi%
  2975. %\ifx#4d\relax\else%
  2976. % \hskbonde%bond between 5 and 4
  2977. %\fi%
  2978. %\ifx#4c\relax\else%
  2979. % \hskbondvert%bond between 4 and 3
  2980. %\fi%
  2981. %%%%%%%%%%%%%%%%%%%%%
  2982. % inner double bond %
  2983. %%%%%%%%%%%%%%%%%%%%%
  2984. \@tfor\member:=#1\do{%
  2985. \if\member r%
  2986. \else \if\member a\relax%
  2987.  \ifx#4a\relax\else%
  2988.    \hbondc%
  2989.  \fi%
  2990. \else \if\member b\relax%
  2991.  \ifx#4b\relax\else%
  2992.   \hbondb%
  2993.  \fi%
  2994. \else \if\member c\relax%
  2995.  \ifx#4c\relax\else%
  2996.    \hbondvert%
  2997.  \fi%
  2998. \else \if\member d\relax%
  2999.  \ifx#4d\relax\else%
  3000.   \hbonde%
  3001.  \fi%
  3002. \else \if\member e\relax%
  3003.  \ifx#4e\relax\else%
  3004.   \hbondd%
  3005.  \fi%
  3006. \else \if\member A%left aromatic circle 
  3007.   \put(233,0){\circle{180}}%               %circle
  3008. \else \expandafter\twoch@@r\member{}{}%
  3009.       \if\@@tmpa 1\relax%
  3010.         \putratom{272}{-18}{\@@tmpb}%      % right type
  3011.       \else\if\@@tmpa 2\relax%
  3012.         \putratom{233}{60}{\@@tmpb}%       % right type
  3013.       \else\if\@@tmpa 3\relax%
  3014.         \putratom{120}{60}{\@@tmpb}%       % right type
  3015.       \else\if\@@tmpa 5\relax%
  3016.         \putratom{233}{-110}{\@@tmpb}%     % right type
  3017.       \else\if\@@tmpa 4\relax%
  3018.         \putratom{120}{-110}{\@@tmpb}%     % right type
  3019.       \else\if\@@tmpa 0\relax%
  3020.         \putratom{196}{-30}{\@@tmpb}%      % right type
  3021.       \fi\fi\fi\fi\fi\fi%
  3022. \fi\fi\fi\fi\fi\fi\fi}%
  3023. %%%%%%%%%%%%%%%%%%%%%%%
  3024. % setting heteroatoms %
  3025. %%%%%%%%%%%%%%%%%%%%%%%
  3026. \ifx\ddd\empty\else%
  3027.    \@cliptrue%
  3028.    \putratom{346}{-36}{\ddd}%              % right type
  3029. \fi%
  3030. \ifx\bbb\empty\else%
  3031.      \@bcliptrue%
  3032.      \putlatom{135}{141}{\bbb}%            % left type
  3033. \fi%
  3034. \ifx\ccc\empty\else%
  3035.      \@ccliptrue%
  3036.      \putratom{273}{141}{\ccc}%            % right type
  3037. \fi%
  3038. \ifx\fff\empty\else%
  3039.      \@fcliptrue%
  3040.      \putlatom{135}{-211}{\fff}%           % left type
  3041. \fi%
  3042. \ifx\eee\empty\else%
  3043.      \@ecliptrue%
  3044.      \putratom{273}{-211}{\eee}%           % right type
  3045. \fi%
  3046. %%%%%%%%%%%%%%%%%%%%%%%%
  3047. % setting substituents %
  3048. %%%%%%%%%%%%%%%%%%%%%%%%
  3049. \setsixringh{#3}{5}{1}{5}{-1}%   % for 1 to 3
  3050. \setsixringh{#3}{10}{4}{7}{-1}%  % for 4 to 5
  3051. \end{picture}\iniatom\iniflag}%  %end of \fiveunith macro
  3052. %
  3053. % ************************************
  3054. % * five-membered unit               *
  3055. % *  (horizontal type, inverse type) *
  3056. % ************************************
  3057. % This macro is a five-membered fragment that can be fused to another 
  3058. % ring structure to produce a new ring system. The following 
  3059. % numbering is adopted in this macro. 
  3060. %
  3061. %                       2  -----  3
  3062. %                        *       |
  3063. % the original point 1 *         |
  3064. %                        *       |
  3065. %                           _____|
  3066. %                        5        4
  3067. %
  3068. %   \fiveunithi[BONDLIST]{ATOMLIST}{SUBSLIST}{OMIT}
  3069. %  
  3070. %     BONDLIST: list of inner double bonds 
  3071. %
  3072. %           a          :  1,2-double bond
  3073. %           b          :  2,3-double bond
  3074. %           c          :  4,3-double bond
  3075. %           d          :  4,5-double bond
  3076. %           e          :  5,1-double bond
  3077. %           A          :  aromatic circle
  3078. %           {n+}       :  plus at the n-nitrogen atom (n = 1 to 4)
  3079. %           {0+}       :  plus (or others) at the center
  3080. %
  3081. %     ATOMLIST: list of heteroatoms (max 5 atoms)
  3082. %
  3083. %       for n = 1 to 5
  3084. %
  3085. %           n          : Hetero atom, e.g. N, O, etc. at n-position
  3086. %                        e.g. 1==N for N at 1-position
  3087. %
  3088. %     SUBSLIST: list of substituents (max 5 substitution positions)
  3089. %
  3090. %       for n = 1 to 5 
  3091. %
  3092. %           nD         :  exocyclic double bond at n-atom
  3093. %           n or nS    :  exocyclic single bond at n-atom
  3094. %           nA         :  alpha single bond at n-atom
  3095. %           nB         :  beta single bond at n-atom
  3096. %           nSA        :  alpha single bond at n-atom (boldface)
  3097. %           nSB        :  beta single bond at n-atom (dotted line)
  3098. %           nSa        :  alpha (not specified) single bond at n-atom
  3099. %           nSb        :  beta (not specified) single bond at n-atom
  3100. %
  3101. %     OMIT:  one bond omitted (a, b, c, d, e, or f)
  3102. %
  3103. %       e.g. 
  3104. %        
  3105. %        \fiveunithi{1==N}{1==H;2==F}{a}
  3106. %
  3107. \def\fiveunithi{\@ifnextchar[{\@fiveunithi}{\@fiveunithi[r]}}%
  3108. \def\@fiveunithi[#1]#2#3#4{%
  3109. \iniatom\iniflag%initialize
  3110. %\def\aaa{}\def\bbb{}\def\ccc{}\def\ddd{}\def\eee{}\def\fff{}%
  3111. \@forsemicol\member:=#2\do{%
  3112. \expandafter\@m@mb@r\member;\relax%
  3113. \expandafter\twoch@r\@membera{}%
  3114. \ifcase\@tmpa%
  3115.  \or \xdef\aaa{\@memberb}%
  3116.  \or \xdef\bbb{\@memberb}%
  3117.  \or \xdef\ccc{\@memberb}%
  3118.  \or \xdef\eee{\@memberb}%
  3119.  \or \xdef\fff{\@memberb}%
  3120. \fi}%
  3121.  \begin{picture}(800,880)(-240,-400)%
  3122.   \iforigpt \put(-\shifti,-\shiftii){\circle*{50}}%
  3123.            \put(-\noshift,-\noshift){\circle{50}}% 
  3124.    \typeout{command `fiveunithi' origin: %
  3125.     (\the\noshift,\the\noshift) ---> (\the\shifti,\the\shiftii)}\fi%
  3126. %%%%%%%%%%%%%%%%%%
  3127. % outer skeleton %
  3128. %%%%%%%%%%%%%%%%%%
  3129. % changed OMIT to a list 1993/11/21 by Shinsaku Fujita
  3130. {\resetbdsw%
  3131. \@tfor\memBer:=#4\do{%
  3132. \if\memBer a\relax\gdef\@aaa{}\fi%
  3133. \if\memBer b\relax\gdef\@bbb{}\fi%
  3134. \if\memBer c\relax\gdef\@ccc{}\fi%
  3135. \if\memBer d\relax\gdef\@ddd{}\fi%
  3136. \if\memBer e\relax\gdef\@eee{}\fi%
  3137. %\if\memBer f\relax\gdef\@fff{}\fi%
  3138. }%
  3139. \if\@aaa a\relax\hskbonda\fi% bond between 1 and 2
  3140. \if\@bbb b\relax\hskbondb\fi% bond between 2 and 3
  3141. \if\@ccc c\relax\hskbondverti\fi% bond between 3 and 4
  3142. \if\@ddd d\relax\hskbonde\fi% bond between 4 and 5
  3143. \if\@eee e\relax\hskbondf\fi% bond between 5 and 6
  3144. %\if\@fff f\relax\hskbondf\fi% bond between 6 and 1
  3145. }%
  3146. % old
  3147. %\ifx#4a\relax\else%
  3148. % \hskbonda%bond between 1 and 2
  3149. %\fi%
  3150. %\ifx#4e\relax\else%
  3151. % \hskbondf%bond between 1 and 5
  3152. %\fi%
  3153. %\ifx#4b\relax\else%
  3154. %  \hskbondb%bond between 2 to 3
  3155. %\fi%
  3156. %\ifx#4d\relax\else%
  3157. % \hskbonde%bond between 5 and 4
  3158. %\fi%
  3159. %\ifx#4c\relax\else%
  3160. % \hskbondverti%bond between 4 and 3
  3161. %\fi%
  3162. %%%%%%%%%%%%%%%%%%%%%
  3163. % inner double bond %
  3164. %%%%%%%%%%%%%%%%%%%%%
  3165. \@tfor\member:=#1\do{%
  3166. \if\member r%
  3167. \else \if\member a\relax%
  3168.  \ifx#4a\relax\else%
  3169.    \hbonda%
  3170.  \fi%
  3171. \else \if\member b\relax%
  3172.  \ifx#4b\relax\else%
  3173.   \hbondb%
  3174.  \fi%
  3175. \else \if\member c\relax%
  3176.  \ifx#4c\relax\else%
  3177.    \hbondverti%
  3178.  \fi%
  3179. \else \if\member d\relax%
  3180.  \ifx#4d\relax\else%
  3181.   \hbonde%
  3182.  \fi%
  3183. \else \if\member e\relax%
  3184.  \ifx#4e\relax\else%
  3185.   \hbondf%
  3186.  \fi%
  3187. \else \if\member A%left aromatic circle 
  3188.   \put(173,0){\circle{180}}%                %circle
  3189. \else \expandafter\twoch@@r\member{}{}%     %plus or minus charges
  3190.       \if\@@tmpa 1\relax%
  3191.         \putratom{-38}{282}{\@@tmpb}%       % right type
  3192.       \else\if\@@tmpa 2\relax%
  3193.         \putratom{60}{233}{\@@tmpb}%        % right type
  3194.       \else\if\@@tmpa 3\relax%
  3195.         \putratom{60}{120}{\@@tmpb}%        % right type
  3196.       \else\if\@@tmpa 4\relax%
  3197.         \putratom{-60}{120}{\@@tmpb}%       % right type
  3198.       \else\if\@@tmpa 5\relax%
  3199.         \putratom{-60}{233}{\@@tmpb}%       % right type
  3200.       \else\if\@@tmpa 0\relax%
  3201.         \putratom{140}{-30}{\@@tmpb}%       % right type
  3202.       \fi\fi\fi\fi\fi\fi%
  3203. \fi\fi\fi\fi\fi\fi\fi}%
  3204. %%%%%%%%%%%%%%%%%%%%%%%
  3205. % setting heteroatoms %
  3206. %%%%%%%%%%%%%%%%%%%%%%%
  3207. \ifx\aaa\empty\else%
  3208.      \@acliptrue%
  3209.      \putlatom{60}{-36}{\aaa}%              % left type
  3210. \fi%
  3211. \ifx\bbb\empty\else%
  3212.      \@bcliptrue%
  3213.      \putlatom{135}{141}{\bbb}%             % left type
  3214. \fi%
  3215. \ifx\ccc\empty\else%
  3216.      \@ccliptrue%
  3217.      \putratom{273}{141}{\ccc}%             % right type
  3218. \fi%
  3219. \ifx\fff\empty\else%
  3220.      \@fcliptrue%
  3221.      \putlatom{135}{-211}{\fff}%            % left type
  3222. \fi%
  3223. \ifx\eee\empty\else%
  3224.      \@ecliptrue%
  3225.      \putratom{273}{-211}{\eee}%            % right type
  3226. \fi%
  3227. %%%%%%%%%%%%%%%%%%%%%%%%
  3228. % setting substituents %
  3229. %%%%%%%%%%%%%%%%%%%%%%%%
  3230. \setsixringh{#3}{0}{0}{4}{0}%  % for 1 to 3
  3231. \setsixringh{#3}{1}{4}{7}{0}%  % for 4 to 5
  3232. \end{picture}\iniatom\iniflag}%      %end of \fiveunithi macro
  3233.  
  3234.